/**
 * ═══════════════════════════════════════════════════════════════
 * Exercise 6: FORM STYLING
 * ═══════════════════════════════════════════════════════════════
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Bar Styling */
header {
    background-color: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-left h2 {
    color: #667eea;
    font-size: 24px;
}

.nav-right a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-right a:hover {
    color: #764ba2;
}

/* Form Container */
.form-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.form-wrapper {
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    animation: slideIn 0.5s ease;
}

.login-wrapper {
    max-width: 450px;
}

/* Slide-in Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Title */
.form-wrapper h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.form-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Labels */
label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.required {
    color: #dc2626;
}

/* Input Fields */
.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:invalid {
    border-color: #dc2626;
}

/* Textarea */
textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Error Messages */
.error-message {
    display: block;
    color: #dc2626;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
}

.success-message {
    color: #10b981;
    text-align: center;
    padding: 15px;
    background-color: #f0fdf4;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
}

.strength-meter {
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    width: 0%;
    transition: width 0.3s ease;
}

.strength-text {
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-top: 5px;
    color: #666;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    color: #555;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    color: #555;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Form Links */
.form-links {
    text-align: center;
    margin-top: 20px;
}

.form-links p {
    margin: 8px 0;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Demo Info */
.demo-info {
    margin-top: 30px;
    padding: 15px;
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 5px;
    font-size: 13px;
    color: #92400e;
}

.demo-info p {
    margin: 5px 0;
}

.demo-info p:first-child {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-wrapper {
        padding: 30px 20px;
    }

    .form-wrapper h1 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    header {
        padding: 15px 20px;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .form-container {
        padding: 0;
    }
}
