:root {
    /* Light Mode */
    --bg-primary: #f5f7fb;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --border: #e2e8f0;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --ad-bg: #f8fafc;
    --ad-border: #cbd5e1;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 20px;
    --radius-md: 12px;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-primary: #0b0f19;
    --bg-card: #151d30;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary: #6366f1;
    --primary-light: #1e293b;
    --primary-dark: #4f46e5;
    --accent: #22d3ee;
    --border: #1e293b;
    --shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --ad-bg: #1e293b;
    --ad-border: #334155;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

header {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 0.6rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    color: var(--text-primary);
}
.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}
.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: block; }

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 3rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--ad-bg);
    border: 1px dashed var(--ad-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0.5rem 0;
    position: relative;
    min-height: 100px;
    overflow: hidden;
}
.ad-container::before {
    content: "SPONSORED";
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 700;
}
.ad-top {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    margin: 0 auto;
}
.ad-bottom {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    margin: 1.5rem auto 0 auto;
}
.ad-sidebar {
    width: 100%;
    min-height: 250px;
    margin-top: 1rem;
}
.adsbygoogle {
    width: 100% !important;
    display: block;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}
@media (min-width: 992px) {
    .layout-grid {
        grid-template-columns: 450px 1fr;
    }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 2.25rem;
    transition: var(--transition);
}
.card:hover {
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.1);
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Forms and Inputs */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}
label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}
input[type="datetime-local"],
input[type="text"],
select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}
input[type="datetime-local"]:focus,
input[type="text"]:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
[data-theme="dark"] input[type="datetime-local"]:focus,
[data-theme="dark"] input[type="text"]:focus,
[data-theme="dark"] select:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-filter-input {
    margin-bottom: 0.4rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
}

.swap-btn-container {
    display: flex;
    justify-content: center;
    margin: 0.75rem 0;
}
.swap-zones-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.swap-zones-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: rotate(180deg);
}
[data-theme="dark"] .swap-zones-btn:hover {
    background: rgba(99, 102, 241, 0.15);
}
.swap-zones-btn svg {
    width: 18px;
    height: 18px;
}

.btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    margin-top: 0.5rem;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* Results Display styles */
.results-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-readout-hero {
    background: linear-gradient(135deg, var(--primary-light), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
[data-theme="dark"] .main-readout-hero {
    background: linear-gradient(135deg, #1e1b4b, #083344);
    border-color: rgba(99, 102, 241, 0.2);
}
.main-time-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.15;
    margin: 0.5rem 0;
}
.main-date-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}
.timezone-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 700;
}

.offset-badge-row {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.badge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-accent {
    color: var(--accent);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.mini-card-icon {
    background: var(--primary-light);
    color: var(--primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .mini-card-icon {
    background: rgba(99, 102, 241, 0.2);
}
.mini-card-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.mini-card-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* 24-Hour Slider Panel Styles */
.slider-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.slider-container {
    margin-top: 1.5rem;
    position: relative;
}

/* Time overlap bar visual */
.overlap-bar {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: #cbd5e1;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}
[data-theme="dark"] .overlap-bar {
    background: #1e293b;
}

/* Custom styled ranges inside overlap visual */
.bar-segment {
    position: absolute;
    height: 100%;
    top: 0;
}
.segment-business {
    background-color: rgba(16, 185, 129, 0.45); /* green */
}
.segment-personal {
    background-color: rgba(245, 158, 11, 0.4); /* orange */
}
.segment-sleep {
    background-color: rgba(30, 41, 59, 0.6); /* dark blue */
}

/* Slider Controls */
.time-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border);
    outline: none;
    margin-bottom: 2rem;
    cursor: pointer;
}
.time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
    cursor: pointer;
    transition: var(--transition);
}
.time-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-labels-row {
    display: flex;
    justify-content: space-between;
    margin-top: -1.2rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Comparison side-by-side times */
.comparison-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}
.comp-column {
    flex: 1;
    text-align: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0.8rem;
    border-radius: var(--radius-md);
}
.comp-zone-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}
.comp-time-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.25rem;
}
.comp-time-status {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.1rem;
    display: inline-block;
    padding: 1px 8px;
    border-radius: 50px;
}
.status-work {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}
.status-personal {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
}
.status-sleep {
    background-color: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

/* FAQ section */
.faq-section {
    margin-top: 3rem;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.faq-question {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    stroke-width: 2.5;
}
.faq-answer {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Explanation Panel */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}
.info-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.info-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.footer-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.current-time-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-primary);
}
[data-theme="light"] .current-time-badge {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.text-center { text-align: center; }
.text-primary-color { color: var(--primary); }

/* Custom Searchable Dropdown */
.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.custom-select-trigger:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

[data-theme="dark"] .custom-select-trigger:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.chevron-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.custom-select-container.open .chevron-icon {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    box-shadow: var(--shadow);
    z-index: 100;
    display: none;
    flex-direction: column;
    max-height: 350px;
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.custom-select-container.open .custom-select-dropdown {
    display: flex;
}

.dropdown-search-wrapper {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 10;
}

.dropdown-search-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.dropdown-search-input:focus {
    border-color: var(--primary);
}

.custom-options-list {
    list-style: none;
    overflow-y: auto;
    max-height: 280px;
    padding: 0.25rem 0;
}

.custom-option {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
}

.custom-option:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

[data-theme="dark"] .custom-option:hover {
    background-color: rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
}

.custom-option.selected {
    background-color: var(--primary);
    color: white;
}

[data-theme="dark"] .custom-option.selected {
    background-color: var(--primary-dark);
}

.custom-option.hidden {
    display: none;
}

/* Social Share Bar Styles */
.share-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 12px 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    align-self: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.share-buttons {
    display: flex;
    gap: 10px;
}
.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    text-decoration: none;
}
.share-btn svg {
    width: 18px;
    height: 18px;
}
.share-btn.twitter-x {
    background: #1da1f2;
}
.share-btn.twitter-x:hover {
    background: #0c85d0;
    transform: scale(1.1);
}
.share-btn.facebook {
    background: #1877f2;
}
.share-btn.facebook:hover {
    background: #0d5ec4;
    transform: scale(1.1);
}
.share-btn.linkedin {
    background: #0a66c2;
}
.share-btn.linkedin:hover {
    background: #08519c;
    transform: scale(1.1);
}
.share-btn.whatsapp {
    background: #25d366;
}
.share-btn.whatsapp:hover {
    background: #1ebd56;
    transform: scale(1.1);
}

/* Searchable Dropdown Option Styling */
.custom-option {
    display: flex;
    flex-direction: column;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
[data-theme="light"] .custom-option {
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.option-main {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}
.option-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    line-height: 1.3;
}
