/* ===== CSS Variables ===== */
:root {
    /* Light Mode Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #dbeafe;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all 0.2s ease;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-color: #334155;
        --accent-light: #1e3a8a;
        --success-light: #064e3b;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1;
    padding: 20px;
    min-height: 100vh;
}

/* ===== Container ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 10px;
}

/* ===== Header ===== */
header {
    text-align: center;
    margin-bottom: 48px;
    padding: 32px 20px;
}

.header-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: float 1s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* ===== Main Converter ===== */
.main-converter {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 0 auto 24px;
    width: 70%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.converter-card {
    margin-bottom: 32px;
}

.input-section {
    margin-bottom: 24px;
}

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

input[type="text"],
input[type="datetime-local"],
textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
}

input[type="text"]:focus,
input[type="datetime-local"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

textarea {
    min-height: 140px;
    resize: vertical;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== Quick Actions ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.quick-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-btn .icon {
    font-size: 1.1rem;
}

/* ===== Divider ===== */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid var(--border-color);
}

.divider span {
    padding: 0 16px;
    background: var(--bg-secondary);
}

/* ===== Output Section ===== */
.output-section {
    margin-top: 32px;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.output-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Timezone Selector ===== */
.timezone-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    border: 1px solid var(--border-color);
}

.tz-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    margin: 0;
}

.timezone-select {
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
}

.timezone-select:hover {
    border-color: var(--accent-primary);
}

.timezone-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.timezone-select optgroup {
    font-weight: 600;
    color: var(--text-primary);
    font-style: normal;
}

.timezone-select option {
    padding: 6px;
    font-weight: 400;
}

/* ===== Output Grid ===== */
.output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.output-item {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.output-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.output-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.output-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.output-text {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-all;
    flex: 1;
    font-weight: 500;
}

.copy-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: var(--success);
}

/* ===== Countdown & Relative Time ===== */
.countdown,
.relative-time {
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    display: none;
}

.countdown {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: var(--shadow-lg);
}

.relative-time {
    background: var(--success-light);
    color: var(--success);
    border: 2px solid var(--success);
}

.countdown.active,
.relative-time.active {
    display: block;
    animation: slideIn 0.3s ease;
}

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

/* ===== Advanced Sections ===== */
.advanced-section {
    margin-bottom: 16px;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 0 auto 24px;
    width: 70%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.section-toggle {
    width: 60%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 0 auto 24px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.section-toggle:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.section-toggle.active {
    border-color: var(--accent-primary);
    background: var(--accent-light);
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.section-toggle.active .toggle-icon {
    transform: rotate(90deg);
    color: var(--accent-primary);
}

.toggle-title {
    flex: 1;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-title .icon {
    font-size: 1.3rem;
}

.badge {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--accent-light);
    color: var(--accent-primary);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Collapsible Content ===== */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.collapsible-content.active {
    max-height: 2000px;
    padding-top: 16px;
}

/* ===== Feature Cards ===== */
.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ===== Input Groups ===== */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ===== Format Options ===== */
.format-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.format-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
}

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

/* ===== Buttons ===== */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ===== Batch Output ===== */
.batch-output {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    display: none;
}

.batch-output.active {
    display: block;
    animation: slideIn 0.3s ease;
}

/* ===== Math Grid ===== */
.math-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.time-adjustments {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.adj-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.adj-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.math-result {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--success-light), var(--accent-light));
    border: 2px solid var(--success);
    border-radius: var(--radius-md);
    font-size: 1rem;
    line-height: 1.8;
    display: none;
}

.math-result.active {
    display: block;
    animation: slideIn 0.3s ease;
}

/* ===== API Examples ===== */
.api-examples {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.api-example {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.api-example:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.api-lang {
    font-weight: 700;
    color: var(--accent-primary);
    margin-right: 12px;
    min-width: 100px;
}

.api-code {
    flex: 1;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    margin-top: 60px;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

    h1 {
        font-size: 2rem;
    }

    .header-icon {
        font-size: 3rem;
    }

    .main-converter {
        padding: 20px;
    }

    .output-grid,
    .math-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .output-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-toggle {
        padding: 14px 18px;
    }

    .toggle-title .icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

        .logo {
            width: 50px;
            height: 50px;
            background: white;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 24px;
            color: #667eea;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .brand-name {
            font-size: 32px;
            font-weight: 700;
            color: white;
            letter-spacing: -0.5px;
        }

        .brand-tagline {
            color: rgba(255, 255, 255, 0.9);
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 10px;
        }

        .tool-title {
            color: white;
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .tool-subtitle {
            color: rgba(255, 255, 255, 0.8);
            font-size: 14px;
        }

        .back-button {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin-top: 15px;
            padding: 10px 20px;
            background: rgba(255, 255, 255, 0.15);
            color: white;
            text-decoration: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s;
            border: 1px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
        }

        .back-button:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .back-button-icon {
            font-size: 16px;
        }

        
          /* ===== AMAZING FOOTER ===== */
        .footer {
            padding: 50px 1px;
            color: #090909;
            text-align: center;
            position: relative;
            overflow: hidden;
            margin-top: 60px;
            color: #ff6b6b;
            
           
        }

        .footer::before {
            content: '';
            color: #090909;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 0px;
            background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
            animation: shimmer 3s infinite linear;
        }

        @keyframes shimmer {
            0% { background-position: -200px 0; }
            100% { background-position: 200px 0; }
        }

        .footer-content {
            max-width: 1000px;
            color: #090909;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 25px;
            position: relative;
            z-index: 1;
        }

        .footer-copyright {
            font-size: 22px;
            color: #c1bdd7;
            font-weight: 700;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
    
            background-clip: text;
            margin: 0;
            text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
            letter-spacing: 0.5px;
        }

        .footer-version {
            font-size: 16px;
            color: #f4f4f4;
            margin: 0;
            font-weight: 500;
            padding: 8px 20px;
            border-radius: 20px;
            border: 1px solid rgba(102, 126, 234, 0.2);
            backdrop-filter: blur(10px);
        }

        .footer-heart {
            color: #ff6b6b;
            animation: heartbeat 1.5s infinite;
            display: inline-block;
        }

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

        .btn-discover {
            margin-top: 6px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 16px 32px;
            font-size: 16px;
            font-weight: 700;
            text-decoration: none;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            gap: 12px;
            transition: all 0.3s ease;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
            border: 2px solid rgba(198, 189, 189, 0.1);
            position: relative;
            overflow: hidden;
        }

        .btn-discover::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .btn-discover:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
        }