/* Color Schemes */
:root {
    /* Will be set via JavaScript - these are defaults */
    --primary-color: #2563eb;
    --secondary-color: #1d4ed8;
    --accent-color: #60a5fa;
    --background-color: #1e293b;
    --surface-color: #334155;
    --text-color: #f8fafc;
    --error-color: #ef4444;
    --success-color: #22c55e;
}

/* Theme Classes */
.theme-blue {
    --primary-color: #2563eb;
    --secondary-color: #1d4ed8;
    --accent-color: #60a5fa;
    --background-color: #1e293b;
    --surface-color: #334155;
    --text-color: #f8fafc;
}

.theme-purple {
    --primary-color: #7c3aed;
    --secondary-color: #6d28d9;
    --accent-color: #a78bfa;
    --background-color: #2e1065;
    --surface-color: #4c1d95;
    --text-color: #f5f3ff;
}

.theme-emerald {
    --primary-color: #059669;
    --secondary-color: #047857;
    --accent-color: #34d399;
    --background-color: #064e3b;
    --surface-color: #065f46;
    --text-color: #ecfdf5;
}

.theme-amber {
    --primary-color: #d97706;
    --secondary-color: #b45309;
    --accent-color: #fbbf24;
    --background-color: #451a03;
    --surface-color: #78350f;
    --text-color: #fffbeb;
}

.theme-rose {
    --primary-color: #e11d48;
    --secondary-color: #be123c;
    --accent-color: #fb7185;
    --background-color: #4c0519;
    --surface-color: #9f1239;
    --text-color: #fff1f2;
}

.theme-teal {
    --primary-color: #0d9488;
    --secondary-color: #0f766e;
    --accent-color: #2dd4bf;
    --background-color: #134e4a;
    --surface-color: #115e59;
    --text-color: #f0fdfa;
}

.theme-indigo {
    --primary-color: #4f46e5;
    --secondary-color: #4338ca;
    --accent-color: #818cf8;
    --background-color: #1e1b4b;
    --surface-color: #312e81;
    --text-color: #eef2ff;
}

.theme-crimson {
    --primary-color: #dc2626;
    --secondary-color: #b91c1c;
    --accent-color: #f87171;
    --background-color: #450a0a;
    --surface-color: #7f1d1d;
    --text-color: #fef2f2;
}

.theme-seafoam {
    --primary-color: #0ea5e9;
    --secondary-color: #0284c7;
    --accent-color: #38bdf8;
    --background-color: #0c4a6e;
    --surface-color: #075985;
    --text-color: #f0f9ff;
}

.theme-royal {
    --primary-color: #6d28d9;
    --secondary-color: #5b21b6;
    --accent-color: #a78bfa;
    --background-color: #2e1065;
    --surface-color: #4c1d95;
    --text-color: #f5f3ff;
}

.theme-forest {
    --primary-color: #15803d;
    --secondary-color: #166534;
    --accent-color: #4ade80;
    --background-color: #052e16;
    --surface-color: #14532d;
    --text-color: #f0fdf4;
}

.theme-sunset {
    --primary-color: #ea580c;
    --secondary-color: #c2410c;
    --accent-color: #fb923c;
    --background-color: #431407;
    --surface-color: #7c2d12;
    --text-color: #fff7ed;
}

.theme-midnight {
    --primary-color: #3730a3;
    --secondary-color: #312e81;
    --accent-color: #6366f1;
    --background-color: #18181b;
    --surface-color: #27272a;
    --text-color: #fafafa;
}

.theme-marine {
    --primary-color: #0369a1;
    --secondary-color: #075985;
    --accent-color: #0ea5e9;
    --background-color: #082f49;
    --surface-color: #0c4a6e;
    --text-color: #f0f9ff;
}

.theme-aurora {
    --primary-color: #2dd4bf;
    --secondary-color: #0d9488;
    --accent-color: #5eead4;
    --background-color: #134e4a;
    --surface-color: #115e59;
    --text-color: #f0fdfa;
}

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease;
}

/* Container Styles */
#input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(
        135deg,
        var(--background-color) 0%,
        var(--surface-color) 100%
    );
    transition: all 0.5s ease;
}

.input-box {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    text-align: center;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Typography */
.input-box h2 {
    margin: 0.5rem 0 0rem 0;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Form Elements */
.input-field {
    width: 100%;
    padding: 1rem;
    margin: 0.825rem 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
	text-align: center;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(var(--accent-color), 0.1);
    background: rgba(255, 255, 255, 0.1);
}

.input-field:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.submit-btn {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: 600;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.submit-btn:active {
    transform: translateY(1px);
}

.submit-btn:disabled {
    background-color: var(--surface-color);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Helper Text Styles */
.format-hint {
    color: var(--text-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: middle;
    opacity: 0.8;
    transition: color 0.3s ease;
}

.format-hint.error {
    color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    margin-top: 1rem;
    font-size: 0.925rem;
    display: none;
    padding: 0.75rem;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: shake 0.5s ease;
}

/* Loading Animation */
.loader {
    display: none;
    width: 3.5rem;
    height: 3.5rem;
    border: 0.25rem solid rgba(255, 255, 255, 0.1);
    border-top: 0.25rem solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1.5rem auto;
}

/* Form Container */
#form-container {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 1.5rem;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease;
    background: var(--background-color);
}

/* Iframe Styles */
#zf_div_tsXg-jhxQBkmNUyEAJ63rX_ltlq5KgdaTZCXL5tGL3U iframe {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    background-color: white;
    transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 480px) {
    .input-box {
        padding: 2rem;
        margin: 1rem;
    }

    .input-box h2 {
        font-size: 1.5rem;
    }

    .input-field {
        font-size: 1rem;
        padding: 0.875rem;
    }

    .submit-btn {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

    .loader {
        width: 3rem;
        height: 3rem;
    }
	
    .logo-container {
        width: 140px;
        height: 140px;
        margin-bottom: 1rem;
    }

    #form-container {
        padding: 0.75rem;
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    .input-box {
        max-width: 90%;
    }
}

/* Light Mode Support 
@media (prefers-color-scheme: light) {
    :root {
        --text-color: #1e293b;
        --background-color: #f8fafc;
        --surface-color: #f1f5f9;
    }

    .input-box {
        background-color: rgba(255, 255, 255, 0.9);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    .input-field {
        background: rgba(0, 0, 0, 0.03);
        color: var(--text-color);
    }

    .format-hint {
        color: rgba(0, 0, 0, 0.7);
    }
    .logo-container {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    .logo-container:hover {
        background: rgba(0, 0, 0, 0.05);
    }	
}*/

/* Logo Styles */
.logo-container {
    margin-bottom: -1.5rem;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logo-container img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo-container:hover img {
    transform: scale(1.05);
}

/* PWA-specific styles */
body.offline {
    position: relative;
}

body.offline::before {
    content: 'You are currently offline';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--error-color);
    color: white;
    text-align: center;
    padding: 0.5rem;
    z-index: 1000;
    font-size: 0.875rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Add support for display:standalone in iOS */
@media all and (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Hide install prompt on installed PWAs */
@media all and (display-mode: standalone) {
    .install-prompt {
        display: none;
    }
}

        .lightbox {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .lightbox.active {
            display: flex;
            opacity: 1;
        }

        .lightbox img {
            max-width: 90%;
            max-height: 90vh;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            transform: scale(0.9);
            transition: transform 0.3s ease;
        }

        .lightbox.active img {
            transform: scale(1);
        }

        .close-lightbox {
            position: absolute;
            top: 20px;
            right: 20px;
            color: white;
            font-size: 30px;
            cursor: pointer;
            background: rgba(255, 255, 255, 0.1);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            transition: background-color 0.3s ease;
        }

        .close-lightbox:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .timer-bar {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: 200px;
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            overflow: hidden;
        }

        .timer-progress {
            width: 100%;
            height: 100%;
            background: var(--accent-color);
            transition: width linear;
        }

        .timer-text {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            color: white;
            font-size: 14px;
            opacity: 0.8;
        }


        /* Custom styles for date picker input */
        .flatpickr-input {
            background-color: rgba(255, 255, 255, 0.05) !important;
            color: var(--text-color) !important;
            border: 2px solid rgba(255, 255, 255, 0.1) !important;
            border-radius: 8px !important;
            font-size: 1.1rem !important;
            width: 100% !important;
            padding: 1rem !important;
            margin: 0.825rem 0 !important;
            text-align: center !important;
            cursor: pointer !important;
        }

        .flatpickr-input:focus {
            outline: none !important;
            border-color: var(--accent-color) !important;
            box-shadow: 0 0 0 4px rgba(var(--accent-color), 0.1) !important;
            background: rgba(255, 255, 255, 0.1) !important;
        }

        .flatpickr-input:hover {
            border-color: var(--accent-color) !important;
            background: rgba(255, 255, 255, 0.08) !important;
        }

        /* Custom styles for the flatpickr calendar */
        .flatpickr-calendar {
            background: var(--surface-color) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            border-radius: 8px !important;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
            color: var(--text-color) !important;
        }

        .flatpickr-day {
            color: var(--text-color) !important;
        }

        .flatpickr-day.selected {
            background: var(--primary-color) !important;
            border-color: var(--primary-color) !important;
        }

        .flatpickr-day:hover {
            background: var(--accent-color) !important;
        }

        .flatpickr-day.disabled {
            color: rgba(255, 255, 255, 0.3) !important;
        }

        .flatpickr-current-month, .flatpickr-monthDropdown-months, .flatpickr-weekday {
            color: var(--text-color) !important;
        }

        .flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month {
            color: var(--text-color) !important;
            fill: var(--text-color) !important;
        }