/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Refined Glass Color Palette (green accent) */
    --primary-color: #0AA84A; /* main green */
    --primary-light: #34C759;
    --secondary-color: #0AA84A;
    --accent-color: #60D394;
    --danger-color: #FF3B30;

    /* Neutral Colors */
    --text-dark: #0F1720;
    --text-medium: #4B5563;
    --text-light: #9CA3AF;
    --border-color: rgba(15, 23, 32, 0.06);

    /* Glass Background */
    --glass-bg: rgba(255, 255, 255, 0.68);
    --glass-border: rgba(255,    .logo {
        height: 70px;
    }5, 255, 0.28);
    --glass-shadow: 0 10px 40px rgba(12, 16, 20, 0.08);

    /* Background Colors */
    --bg-primary: #F3F7F4;
    --bg-secondary: #FFFFFF;

    /* Effects */
    --blur-amount: 24px;
    --radius-small: 12px;
    --radius-medium: 18px;
    --radius-large: 20px;
    --transition: all 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
}

body {
    font-family: 'Fustat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(10,168,74,0.03), transparent 10%),
                radial-gradient(900px 400px at 90% 90%, rgba(52,199,89,0.03), transparent 10%),
                var(--bg-primary);
    min-height: 100vh;
    padding: 36px 18px;
    line-height: 1.65;
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Animated Background Shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.22;
    transform-origin: center;
    animation: float 22s ease-in-out infinite;
}

.shape-1 {
    width: 480px;
    height: 480px;
    background: linear-gradient(135deg, rgba(10,168,74,0.18), rgba(52,199,89,0.12));
    top: -120px;
    right: -140px;
    animation-delay: 0s;
}

.shape-2 {
    width: 360px;
    height: 360px;
    background: linear-gradient(135deg, rgba(96,211,148,0.12), rgba(10,168,74,0.08));
    bottom: -80px;
    left: -80px;
    animation-delay: 6s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(52,199,89,0.12), rgba(96,211,148,0.06));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 12s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* Container with Glass Effect */
.container {
    max-width: 820px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.62));
    backdrop-filter: blur(calc(var(--blur-amount) - 6px));
    -webkit-backdrop-filter: blur(calc(var(--blur-amount) - 6px));
    border-radius: calc(var(--radius-large) + 4px);
    border: 1px solid rgba(255,255,255,0.28);
    box-shadow: 0 12px 50px rgba(12,16,20,0.08);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Header with Glass Effect */
.header {
    background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0.28));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 34px 34px;
    text-align: center;
    border-bottom: 1px solid rgba(15,23,32,0.04);
}

.logo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    height: 100px;
    width: auto;
    border-radius: 12px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.logo:hover {
    transform: scale(1.05);
}

.header h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.4px;
}

.subtitle {
    font-size: 0.98rem;
    color: var(--text-medium);
    font-weight: 500;
}

/* Form Sections */
.survey-form {
    padding: 30px 36px 40px 36px;
}

.form-section {
    margin-bottom: 26px;
    animation: fadeInUp 0.5s ease-out;
    background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.54));
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(15,23,32,0.03);
    box-shadow: 0 6px 24px rgba(12,16,20,0.04);
}

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

.section-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(15,23,32,0.04);
    letter-spacing: -0.2px;
}

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

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

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.required {
    color: var(--danger-color);
    margin-right: 3px;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: -5px;
    margin-bottom: 12px;
    font-weight: 400;
}

/* Glass Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(12,16,20,0.06);
    border-radius: calc(var(--radius-small) - 2px);
    font-size: 0.98rem;
    font-family: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.78));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-dark);
    font-weight: 500;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
    color: var(--text-light);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover {
    border-color: rgba(10,168,74,0.18);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(12,16,20,0.04);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    box-shadow: 0 6px 22px rgba(10,168,74,0.08);
    transform: translateY(-3px);
}

/* Manual validation errors (only applied via JavaScript) */
.field-error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1) !important;
}

.checkbox-group-error {
    border: 2px solid var(--danger-color);
    border-radius: var(--radius-small);
    padding: 8px;
    background: rgba(255, 59, 48, 0.05);
}

/* Validation error styles for checkbox groups */
.checkbox-group.error,
.radio-group.error {
    border: 2px solid var(--danger-color) !important;
    border-radius: 8px;
    padding: 8px;
    background: rgba(255, 59, 48, 0.05);
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Checkbox and Radio with Glass Effect */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.checkbox-label:hover,
.radio-label:hover {
    border-color: rgba(10,168,74,0.18);
    background: rgba(255, 255, 255, 0.92);
    transform: translateX(-2px);
    box-shadow: 0 6px 18px rgba(12,16,20,0.04);
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    margin-left: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label:has(input:checked),
.radio-label:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(10,168,74,0.06);
    box-shadow: 0 6px 20px rgba(10,168,74,0.06);
}

.other-input {
    margin-top: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 100px;
    }
}

/* Button with Glass Effect */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.btn-submit {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 14px 42px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 10px 30px rgba(10,168,74,0.14);
    letter-spacing: -0.2px;
    width: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 16px 42px rgba(10,168,74,0.18);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

/* Success Message with Glass Effect */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.success-content {
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.85));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 38px 30px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,32,0.04);
    text-align: center;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(12,16,20,0.14);
    animation: scaleUp 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    color: var(--secondary-color);
    margin-bottom: 24px;
    animation: checkmark 0.6s ease-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-content h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.success-content p {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Validation Styles */
input:invalid:not(:placeholder-shown):not(:focus):user-invalid,
select:invalid:not(:placeholder-shown):not(:focus):user-invalid {
    border-color: var(--danger-color);
    background: rgba(255, 59, 48, 0.05);
}

input:valid:not(:placeholder-shown):user-valid,
select:valid:not(:placeholder-shown):user-valid {
    border-color: rgba(52, 199, 89, 0.5);
}

/* Prevent red borders before user interaction */
input:required:invalid,
select:required:invalid {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.8);
}

input[type="text"]:not(:focus):not(:placeholder-shown):invalid,
input[type="email"]:not(:focus):not(:placeholder-shown):invalid,
input[type="tel"]:not(:focus):not(:placeholder-shown):invalid,
input[type="number"]:not(:focus):not(:placeholder-shown):invalid,
select:not(:focus):invalid {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.8);
}

/* Show validation only after form submission attempt */
.was-validated input:invalid,
.was-validated select:invalid {
    border-color: var(--danger-color);
    background: rgba(255, 59, 48, 0.05);
}

.was-validated input:valid,
.was-validated select:valid {
    border-color: rgba(52, 199, 89, 0.5);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, rgba(10,168,74,1), rgba(52,199,89,1));
    transition: width 0.25s ease;
    z-index: 9999;
    box-shadow: 0 0 18px rgba(10,168,74,0.18);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px 10px;
    }

    .container {
        max-width: 100%;
        margin: 0;
    }

    .header {
        padding: 30px 20px;
    }

    .logo-container {
        margin-bottom: 15px;
    }

    .logo {
        height: 50px;
    }

    .header h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .survey-form {
        padding: 20px 15px;
    }

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

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

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

    .success-content {
        padding: 30px 20px;
        margin: 10px;
        max-width: 95%;
    }

    .btn-submit {
        width: 100%;
        padding: 16px 20px;
        font-size: 1.1rem;
    }

    .shape {
        filter: blur(80px);
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 5px;
    }

    .header {
        padding: 20px 15px;
    }

    .logo {
        height: 40px;
    }

    .header h1 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .survey-form {
        padding: 15px 10px;
    }

    .form-section {
        padding: 12px;
        margin-bottom: 15px;
    }

    .checkbox-label,
    .radio-label {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 0.9rem;
        padding: 12px 14px;
    }
}

/* Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: rgba(10,168,74,0.16);
    color: var(--text-dark);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

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

    .background-shapes,
    .btn-submit,
    .success-message {
        display: none;
    }

    .container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Loading State */
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error Message */
.error-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
