:root {
    --primary-color: #0b70b6;
    --primary-light: #66befd;
    --primary-dark: #074b7a;
    --bg-color: #f4f8fb;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #e0eaf5 0%, #f4f8fb 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.form-container {
    background-color: var(--white);
    width: 100%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    max-width: 160px;
    margin-bottom: 1.5rem;
    background-color: var(--primary-dark);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
}

.form-header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 10px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 20%; /* Starting width */
    transition: width 0.4s ease;
}

/* Steps */
.step {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.step-active {
    display: block;
}

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

h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Form Groups & Inputs */
.form-group {
    margin-bottom: 1.8rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    background-color: #fafafa;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 190, 253, 0.2);
    background-color: var(--white);
}

.error-msg {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.4rem;
    display: none;
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: var(--error-color);
}

/* Rating Buttons */
.rating-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rating-buttons button {
    flex: 1;
    min-width: 40px;
    height: 45px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-group-5 .rating-buttons button {
    min-width: 60px;
}

.rating-buttons button:hover {
    background-color: var(--primary-light);
    color: var(--white);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.rating-buttons button.selected {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* Radio Cards */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-card .card-content {
    display: block;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.3s ease;
    font-weight: 500;
}

.radio-card:hover .card-content {
    border-color: var(--primary-light);
    background-color: var(--white);
}

.radio-card input:checked ~ .card-content {
    border-color: var(--primary-color);
    background-color: rgba(11, 112, 182, 0.05);
    color: var(--primary-color);
    box-shadow: inset 0 0 0 1px var(--primary-color);
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 30px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(11, 112, 182, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 112, 182, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #f1f1f1;
    color: var(--text-color);
}

.btn-submit {
    background-color: var(--success-color);
    color: var(--white);
    display: none;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-submit:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* Success Message */
#successMessage {
    text-align: center;
    padding: 3rem 0;
    animation: fadeIn 0.6s ease;
}

#successMessage.hidden {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem auto;
}

/* Responsive */
@media (max-width: 768px) {
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .rating-buttons button {
        flex: 1 0 18%; /* Force wrapping on very small screens */
    }
    
    .rating-group-5 .rating-buttons button {
        flex: 1 0 45%;
    }
}
