/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideInUp 0.8s ease-out;
    border: 2px solid #E8B126;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    background: linear-gradient(135deg, #E8B126 0%, #04157A 100%, white 10%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.form-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #E8B126, #04157A);
    width: 0%;
    transition: width 0.5s ease;
}

form {
    padding: 40px;
    background: white;
}

.form-group {
    margin-bottom: 30px;
    padding: 25px;
    background: #fafafa;
    border-radius: 10px;
    border-left: 4px solid #E8B126;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: white;
}

.question-number {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #E8B126;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(232, 177, 38, 0.3);
}

.question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #04157A;
    margin-bottom: 15px;
    display: block;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
    outline: none;
    border-color: #E8B126;
    box-shadow: 0 0 0 3px rgba(232, 177, 38, 0.1);
    background: white;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.radio-group.scale {
    grid-template-columns: repeat(11, 1fr);
    gap: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
    font-weight: 500;
    text-align: center;
    min-height: 45px;
}

.radio-group.scale label {
    padding: 8px 4px;
    font-size: 0.9rem;
}

.radio-group label:hover {
    border-color: #E8B126;
    background: #fff8e6;
    transform: translateY(-1px);
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group input[type="radio"]:checked + label {
    border-color: #E8B126;
    background: #E8B126;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(232, 177, 38, 0.3);
}

.conditional-field {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #E8B126;
}

.validation-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 8px;
    display: none;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #E8B126 0%, #04157A 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(232, 177, 38, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(232, 177, 38, 0.4);
}

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

.success-message {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #E8B126 0%, #04157A 100%);
    color: white;
    border-radius: 10px;
    margin: 20px;
}

.success-message h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.success-message p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Character count */
.character-count {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.character-count.valid {
    color: #28a745;
}

.character-count.invalid {
    color: #dc2626;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .btn-primary {
    background: #94a3b8;
}

.loading .btn-primary::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        margin: 0;
        border-radius: 12px;
    }

    .form-header {
        padding: 25px 20px;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    form {
        padding: 25px 20px;
    }

    .form-group {
        padding: 20px;
        margin-bottom: 20px;
    }

    .radio-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .radio-group.scale {
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
    }

    .radio-group.scale label {
        padding: 6px 2px;
        font-size: 0.8rem;
        min-height: 35px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .radio-group.scale {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .form-header h1 {
        font-size: 1.8rem;
    }
    
    .question {
        font-size: 1rem;
    }
}