/* Global Styles */
:root {
    --deep-blue: #0057B8;
    --teal: #007A73;
    --amber: #E08000;
    --dark-charcoal: #333333;
    --light-gray: #F6F6F6;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --success-green: #28A745;
    --warning-orange: #FF9800;
    --error-red: #D32F2F;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-charcoal);
    line-height: 1.6;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--teal) 100%);
    color: var(--white);
    padding: 2rem 1rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* UTC Banner */
.utc-banner {
    background-color: var(--dark-charcoal);
    color: var(--white);
    padding: 1rem;
    text-align: center;
    border-top: 4px solid var(--amber);
}

.utc-note {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.95rem;
}

.utc-time {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    margin-top: 0.5rem;
    font-weight: bold;
    color: var(--amber);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Time Zone Selector */
.timezone-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.timezone-group {
    display: flex;
    flex-direction: column;
}

.timezone-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--deep-blue);
    font-size: 1rem;
}

.timezone-dropdown {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--white);
    color: var(--dark-charcoal);
    cursor: pointer;
    transition: var(--transition);
}

.timezone-dropdown:hover {
    border-color: var(--teal);
}

.timezone-dropdown:focus {
    outline: none;
    border-color: var(--deep-blue);
    box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.1);
}

/* Time Display */
.time-display {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: center;
}

.time-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.time-card:hover {
    box-shadow: 0 4px 16px rgba(0, 87, 184, 0.15);
    transform: translateY(-2px);
}

.time-card h2 {
    color: var(--deep-blue);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.time {
    font-family: 'Courier New', monospace;
    font-size: 3rem;
    font-weight: bold;
    color: var(--deep-blue);
    margin: 1rem 0;
    letter-spacing: 2px;
}

.period {
    font-size: 1.5rem;
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 1rem;
}

.activity-status {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.arrow-divider {
    font-size: 2.5rem;
    color: var(--teal);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Activity Guide */
.activity-guide {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.activity-guide h3 {
    color: var(--deep-blue);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.activity-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--teal);
}

.legend-item span:nth-child(2) {
    font-size: 0.95rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.badge-sleep {
    background-color: rgba(51, 51, 51, 0.2);
}

.badge-commute {
    background-color: rgba(224, 128, 0, 0.2);
}

.badge-work {
    background-color: rgba(0, 87, 184, 0.2);
}

.badge-lunch {
    background-color: rgba(0, 122, 115, 0.2);
}

.badge-evening {
    background-color: rgba(40, 167, 69, 0.2);
}

/* Status Badge Styles */
.status-badge.asleep {
    background-color: var(--dark-charcoal);
    color: var(--white);
}

.status-badge.commuting {
    background-color: var(--amber);
    color: var(--white);
}

.status-badge.work {
    background-color: var(--deep-blue);
    color: var(--white);
}

.status-badge.lunch {
    background-color: var(--teal);
    color: var(--white);
}

.status-badge.evening {
    background-color: var(--success-green);
    color: var(--white);
}

/* Best Time Recommendation */
.best-time-recommendation {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--teal);
}

.best-time-recommendation h3 {
    color: var(--deep-blue);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.recommendation-box {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--success-green);
}

.recommendation-box p {
    color: var(--dark-charcoal);
    font-size: 1rem;
    line-height: 1.6;
}

/* Time Zone Difference Reference */
.timezone-reference {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.timezone-reference h3 {
    color: var(--deep-blue);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.difference-box {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--deep-blue);
}

.difference-box p {
    color: var(--dark-charcoal);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* AdSense Banner */
.adsense-banner {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
footer {
    background-color: var(--dark-charcoal);
    color: var(--white);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.disclaimers {
    max-width: 1200px;
    margin: 0 auto 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--amber);
}

.disclaimers h4 {
    color: var(--amber);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.disclaimers ul {
    list-style: none;
    padding: 0;
}

.disclaimers li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.disclaimers li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--teal);
}

.disclaimers a {
    color: var(--teal);
    text-decoration: none;
}

.disclaimers a:hover {
    text-decoration: underline;
}

.footer-text {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .time-display {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .arrow-divider {
        transform: rotate(90deg);
    }

    .timezone-selector {
        grid-template-columns: 1fr;
    }

    .header-content h1 {
        font-size: 2rem;
    }

    .time {
        font-size: 2.5rem;
    }

    .activity-legend {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .time-card {
        padding: 1.5rem;
    }

    .header-content h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .time {
        font-size: 2rem;
    }

    .timezone-dropdown {
        font-size: 0.95rem;
    }

    .best-time-recommendation h3,
    .timezone-reference h3,
    .activity-guide h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .timezone-selector {
        gap: 1rem;
    }

    .time {
        font-size: 1.75rem;
    }

    .time-card {
        padding: 1rem;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

    .legend-item {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .badge {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .time-card,
    .activity-guide,
    .best-time-recommendation,
    .timezone-reference,
    .timezone-selector,
    .adsense-banner {
        background-color: #2a2a2a;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .time-card h2,
    .activity-guide h3,
    .best-time-recommendation h3,
    .timezone-reference h3 {
        color: var(--teal);
    }

    .timezone-group label {
        color: var(--teal);
    }

    .timezone-dropdown {
        background-color: #2a2a2a;
        color: #e0e0e0;
        border-color: #444;
    }

    .legend-item {
        background-color: #333;
    }

    .recommendation-box,
    .difference-box {
        background-color: #333;
        color: #e0e0e0;
    }
}

@media print {
    header,
    .utc-banner,
    .adsense-banner,
    footer {
        display: none;
    }

    .time-card {
        page-break-inside: avoid;
    }
}
