/* Critical CSS for TimeZonder 
 * Only includes styles needed for initial page rendering
 * 
 * ACCESSIBILITY NOTE: All decorative animations are wrapped in 
 * @media (prefers-reduced-motion: no-preference) to respect user 
 * motion preferences and support users with vestibular disorders
 */

:root {
    /* Primary palette */
    --primary-color: #7c3aed;
    /* violet-600 */
    --primary-light: #a78bfa;
    /* violet-400 */
    --primary-dark: #5b21b6;
    /* violet-800 */

    /* Accent palette */
    --accent-color: #3b82f6;
    /* blue-500 */
    --accent-light: #60a5fa;
    /* blue-400 */
    --accent-dark: #2563eb;
    /* blue-600 */

    /* Tertiary palette */
    --tertiary-color: #f59e0b;
    /* amber-500 */
    --tertiary-light: #fbbf24;
    /* amber-400 */
    --tertiary-dark: #d97706;
    /* amber-600 */

    /* Neutral colors */
    --text-primary: #333333;
    --text-secondary: #666666;
    --background: #f9fafb;
    --secondary-bg: #f1f5f9;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;

    /* Status colors */
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    --gradient-tertiary: linear-gradient(135deg, var(--tertiary-color), var(--tertiary-dark));
    --gradient-hybrid: linear-gradient(135deg, var(--accent-color), var(--primary-color), var(--tertiary-color));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-bg), var(--background));

    /* City Card Gradients - Critical */
    --city-gradient-1: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    --city-gradient-2: linear-gradient(135deg, var(--accent-light), var(--accent-color));
    --city-gradient-3: linear-gradient(135deg, var(--tertiary-light), var(--tertiary-color));

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dark-theme {
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --background: #0f172a;
    --secondary-bg: #1e293b;
    --card-bg: #1e293b;
    --border-color: #334155;
    --gradient-secondary: linear-gradient(135deg, #1e293b, #0f172a);

    /* City Card Gradients for Dark Theme - Critical */
    --city-gradient-1: linear-gradient(135deg, #8b5cf6, #4c1d95);
    --city-gradient-2: linear-gradient(135deg, #60a5fa, #1d4ed8);
    --city-gradient-3: linear-gradient(135deg, #fbbf24, #b45309);

    /* Panel backgrounds for dark theme */
    --source-panel-bg: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(124, 58, 237, 0.2));
    --target-panel-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.2));
}

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

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    transition: background-color .3s ease, color .3s ease;
    overflow-x: hidden;
}

/* Font display strategy to prevent layout shifts */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Inter Regular'), local('Inter-Regular');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: local('Inter Medium'), local('Inter-Medium');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: local('Inter SemiBold'), local('Inter-SemiBold');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local('Inter Bold'), local('Inter-Bold');
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(245, 158, 11, 0.07) 100%);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-radius: 0 0 2rem 2rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--primary-light);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 1rem;
    position: relative;
    z-index: 5;
    box-shadow: var(--shadow-sm);
}

.dark-theme .theme-toggle {
    background: var(--primary-dark);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

/* Theme toggle tooltip */
.theme-toggle-tooltip {
    position: absolute;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    top: calc(100% + 10px);
    right: 0;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.theme-toggle:hover .theme-toggle-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}



.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

main {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    padding-bottom: 3rem;
}

.hero-section {
    background-color: var(--background);
    padding: 5rem 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
    min-height: 600px;
    contain: layout;
}

/* Apply decorative background after initial render */
.gradient-text-ready .hero-section {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(59, 130, 246, 0.05) 50%, rgba(245, 158, 11, 0.05) 100%);
    border-radius: 2rem;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.02);
}

/* Disable problematic pseudo-element to prevent 0.324 layout shift */
.gradient-text-ready .hero-section::before {
    content: none;
}

.hero-content {
    flex: 1;
    z-index: 2;
    position: relative;
    min-height: 300px;
    max-width: 500px;
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 800;
    max-width: 32rem;
    position: relative;
    letter-spacing: -0.02em;
    will-change: auto;
}

/* Apply gradient only after initial paint for better LCP */
.gradient-text-ready h1 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 50%, var(--tertiary-color) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 30rem;
    position: relative;
    line-height: 1.5;
}

.hero-subtitle::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--tertiary-color), var(--tertiary-light));
    border-radius: 3px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 550px;
    min-height: 400px;
    aspect-ratio: 550/400;
    z-index: 1;
}

.time-illustration {
    display: block;
    width: 100%;
    max-width: 450px;
    height: auto;
    margin: 0 auto;
    will-change: transform;
    contain: layout paint;
    aspect-ratio: 16/9;
    transform: translateZ(0);
    backface-visibility: hidden;
    content-visibility: auto;
    transition: opacity 0.3s ease, transform 0.5s ease;
    /* Start with slightly transparent until loaded */
    opacity: 0.9;
}

.time-illustration.loaded {
    opacity: 1;
}

/* Prevent world clocks layout shift */
.world-clock-skeleton {
    height: 180px;
    background-color: var(--card-bg);
    border-radius: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.world-clock-skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Apply skeleton loading animation only when motion is not reduced */
@media (prefers-reduced-motion: no-preference) {
    .world-clock-skeleton::after {
        animation: skeleton-loading 1.5s infinite;
    }
}

/* Provide static visual feedback for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    .world-clock-skeleton::after {
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        opacity: 0.6;
    }

    /* Ensure interactive elements still have focus indicators */
    .gradient-text-ready .main-clock,
    .gradient-text-ready .left-clock,
    .gradient-text-ready .right-clock {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .gradient-text-ready .main-clock:hover,
    .gradient-text-ready .left-clock:hover,
    .gradient-text-ready .right-clock:hover {
        transform: scale(1.02);
        box-shadow: var(--shadow-lg);
    }
}

@keyframes skeleton-loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}



.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-outline {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    color: var(--tertiary-dark);
    border: 2px solid rgba(245, 158, 11, 0.4);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
    transition: all 0.3s ease;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Section styles */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    contain: content;
}

.section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Force hardware acceleration for slow connections - only when motion is not reduced */
@media (prefers-reduced-motion: no-preference) {
    .force-hardware-acceleration * {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
}

/* Alternative optimization for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    .force-hardware-acceleration * {
        /* Use less aggressive optimization that doesn't involve transforms */
        will-change: auto;
        contain: layout paint;
    }
}



/* Critical Meeting Planner City Styles */
.meeting-timezone-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease-in-out;
    position: relative;
}

.meeting-timezone-item .city-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    box-shadow: var(--shadow-sm);
}

.time-result-card {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.time-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: var(--city-gradient-1);
    opacity: 0.9;
}

.time-result-card:nth-child(2n)::before {
    background-image: var(--city-gradient-2);
}

.time-result-card:nth-child(3n)::before {
    background-image: var(--city-gradient-3);
}

.time-result-city {
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.time-result-city .city-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    box-shadow: var(--shadow-sm);
}

/* City Icons - Critical */
.city-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Region-specific gradient backgrounds - Critical */
.city-icon[data-region="asia"] {
    background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
}

.city-icon[data-region="europe"] {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.city-icon[data-region="america"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.city-icon[data-region="africa"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.city-icon[data-region="oceania"],
.city-icon[data-region="pacific"],
.city-icon[data-region="australia"] {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* Basic timezone tag styles - Critical */
.timezone-tag {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-radius: 1rem;
    margin: 0.5rem 0.25rem;
    background-color: var(--card-bg);
    border: 1px solid rgba(124, 58, 237, 0.15);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Essential converter result styling for critical path */
.result-container {
    width: 100%;
    max-width: 850px;
    margin: 2rem auto;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.result-container.hidden {
    display: none;
}

.result-container:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

#result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#result.show {
    display: flex;
}

#result.error {
    color: var(--error-color);
    font-weight: 500;
    text-align: center;
    padding: 1.5rem;
}

/* Basic time panel styling for critical path */
.conversion-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 850px;
    gap: 1.5rem;
    position: relative;
    margin: 0 auto;
}

.time-panels {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    gap: 1.5rem;
}

.time-panel {
    flex: 1;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(124, 58, 237, 0.1));
    border-radius: 1rem;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.time-panel.source {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(124, 58, 237, 0.1));
}

.dark-theme .time-panel.source {
    background: var(--source-panel-bg);
    border-color: rgba(124, 58, 237, 0.3);
}

.time-panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    background-color: rgba(255, 255, 255, 0.5);
}

.dark-theme .time-panel-title {
    background-color: rgba(30, 41, 59, 0.5);
    color: var(--text-secondary);
}

.source .time-panel-title {
    color: var(--primary-color);
}

.target .time-panel-title {
    color: var(--accent-color);
}

.dark-theme .source .time-panel-title {
    color: var(--primary-light);
    background-color: rgba(124, 58, 237, 0.15);
}

.time-panel.target {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.dark-theme .time-panel.target {
    background: var(--target-panel-bg);
    border-color: rgba(59, 130, 246, 0.3);
}

.dark-theme .target .time-panel-title {
    color: var(--accent-light);
    background-color: rgba(59, 130, 246, 0.15);
}

.time-value {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.time-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.time-location i {
    color: var(--primary-color);
}

.dark-theme .time-location i {
    color: var(--primary-light);
}

.target .time-location i {
    color: var(--accent-color);
}

.dark-theme .target .time-location i {
    color: var(--accent-light);
}

.time-date {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0.5rem 0;
}

.conversion-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    margin: 0;
    flex-shrink: 0;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
    align-self: center;
}



@media (max-width: 400px) {
    .time-panel {
        padding: 1.5rem 1rem;
    }

    .time-value {
        font-size: 2.8rem;
    }

    .time-location {
        font-size: 1.2rem;
    }
}

#conversionResultContainer {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.btn-action {
    width: 32px;
    height: 32px;
    min-width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    padding: 0;
    font-size: 0.85rem;
    background: rgba(100, 116, 139, 0.1);
    color: rgba(100, 116, 139, 0.8);
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-action:hover {
    background: rgba(100, 116, 139, 0.2);
    color: rgba(100, 116, 139, 1);
    transform: translateY(-1px);
}

.btn-action span {
    display: none;
}

/* Buttons have consistent neutral color */



@media (max-width: 480px) {
    .time-panel {
        min-height: 160px;
        width: 90%;
    }

    .time-value {
        font-size: 3rem;
    }

    .time-location {
        font-size: 1.3rem;
    }

    .conversion-arrow {
        width: 45px;
        height: 45px;
    }
}

/* Critical styles for central action buttons */
.central-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    position: relative;
    z-index: 4;
}

.central-actions .btn-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.dark-theme .central-actions .btn-action {
    background: var(--secondary-bg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(124, 58, 237, 0.3);
}



/* Basic timezone notification structure - Critical */
.timezone-update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    border-left: 4px solid var(--primary-color);
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    z-index: 10000;
    display: none;
}



/* Promo Banner - Enhanced Styling */
.promo-banner {
    background: var(--gradient-secondary);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.promo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 4px 8px rgba(124, 58, 237, 0.2);
}

.promo-content {
    flex-grow: 1;
}

.promo-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.promo-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.promo-link {
    display: inline-block;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
}

.promo-disclaimer {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-top: 0.5rem;
}



/* Hero Section Visual Elements */
.hero-visuals {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 550px;
    min-height: 400px;
    aspect-ratio: 550/400;
    position: relative;
    z-index: 1;
    /* Make visuals non-blocking for LCP */
    content-visibility: auto;
    contain-intrinsic-size: 550px 400px;
}

/* Square Clock Styling */
.clock-circle {
    background: white;
    border-radius: 10%;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    overflow: hidden;
}

/* Make main clock round and side clocks square */
.main-clock {
    width: 180px;
    height: 180px;
    background: white;
    border: 2px solid #e2e8f0;
    z-index: 2;
    position: relative;
    border-radius: 50%;
    /* Main clock is round */
}

/* Apply animations after initial render - only when motion is not reduced */
@media (prefers-reduced-motion: no-preference) {
    .gradient-text-ready .main-clock {
        animation: float-main 6s infinite ease-in-out;
    }
}

/* Static styles for main clock (always applied) */
.gradient-text-ready .main-clock {
    background: radial-gradient(circle at center, white 0%, #f9fafb 85%);
    box-shadow: var(--shadow-md);
}

/* UTC main clock with golden glow */
.gradient-text-ready .main-clock {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
    border: 2px solid rgba(245, 158, 11, 0.3);
}

/* Clock tick marks for main clock - round style */
.main-clock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at center, transparent 75%, var(--text-secondary) 75%, var(--text-secondary) 77%, transparent 77%),
        linear-gradient(90deg, transparent 49%, var(--text-secondary) 49%, var(--text-secondary) 51%, transparent 51%),
        linear-gradient(180deg, transparent 49%, var(--text-secondary) 49%, var(--text-secondary) 51%, transparent 51%),
        linear-gradient(45deg, transparent 49%, var(--text-secondary) 49%, var(--text-secondary) 51%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, var(--text-secondary) 49%, var(--text-secondary) 51%, transparent 51%);
    opacity: 0.3;
    border-radius: 50%;
}

/* Clock Face Elements */
.clock-face {
    width: 90%;
    height: 90%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

/* Match clock face border radius to its parent */
.main-clock .clock-face {
    border-radius: 50%;
}

.left-clock .clock-face,
.right-clock .clock-face {
    border-radius: 10%;
}

/* Positioned clocks */
.left-clock {
    width: 100px;
    height: 100px;
    left: 20%;
    top: 40%;
    z-index: 1;
    border-radius: 10%;
}

.right-clock {
    width: 100px;
    height: 100px;
    right: 20%;
    top: 40%;
    z-index: 1;
    border-radius: 10%;
}

/* Apply floating animations to side clocks only when motion is not reduced */
@media (prefers-reduced-motion: no-preference) {
    .left-clock {
        animation: float-left 7s infinite ease-in-out;
    }

    .right-clock {
        animation: float-right 7s infinite ease-in-out;
    }
}

/* Clock Face Elements */
.clock-face {
    width: 90%;
    height: 90%;
    border-radius: 10%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.clock-center {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    z-index: 10;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.main-clock .clock-center {
    width: 12px;
    height: 12px;
    background: var(--tertiary-dark);
    box-shadow: 0 0 5px rgba(124, 58, 237, 0.3);
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

.hour-hand {
    height: 35%;
    width: 4px;
    background: var(--text-primary);
    transform: translateX(-50%) rotate(var(--random-hour-rotation, 45deg));
}

.main-clock .hour-hand {
    height: 30%;
    width: 6px;
    background: var(--tertiary-dark);
    border-radius: 3px 3px 1px 1px;
    transform: translateX(-50%) rotate(var(--random-hour-rotation, 125deg));
}

.minute-hand {
    height: 45%;
    width: 3px;
    background: var(--text-primary);
    transform: translateX(-50%) rotate(var(--random-minute-rotation, 135deg));
}

.main-clock .minute-hand {
    height: 40%;
    width: 4px;
    background: var(--tertiary-dark);
    border-radius: 2px 2px 1px 1px;
    transform: translateX(-50%) rotate(var(--random-minute-rotation, 250deg));
}

/* Clock label */
.clock-marker {
    position: absolute;
    font-size: 16px;
    font-weight: 600;
    color: var(--tertiary-dark);
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
}

.marker-top {
    top: 15%;
}

.clock-label {
    position: absolute;
    bottom: -25px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
    text-align: center;
}

/* Decorative Elements */
.decorative-shape {
    position: absolute;
    border-radius: 30%;
    opacity: 0.6;
    z-index: 0;
}

.shape-1 {
    width: 150px;
    height: 30px;
    background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
    top: 45%;
    left: 10%;
    transform: rotate(15deg);
    opacity: 0.3;
}

.shape-2 {
    width: 120px;
    height: 30px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-light) 100%);
    top: 55%;
    right: 10%;
    transform: rotate(-15deg);
    opacity: 0.3;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--tertiary-light), var(--tertiary-color));
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%) rotate(45deg) scale(0.3);
    opacity: 0.2;
}

.globe-dots {
    position: absolute;
    width: 100%;
    height: 100%;
}

.globe-dot {
    position: absolute;
    border-radius: 50%;
}

.dot-1 {
    width: 20px;
    height: 20px;
    background: var(--primary-light);
    opacity: 0.3;
    bottom: 25%;
    left: 35%;
}

.dot-2 {
    width: 30px;
    height: 30px;
    background: var(--accent-light);
    opacity: 0.2;
    bottom: 30%;
    right: 30%;
}

.dot-3 {
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, var(--tertiary-color), #ffc107);
    opacity: 0.4;
    top: 30%;
    left: 40%;
}

/* Apply dot animations only when motion is not reduced */
@media (prefers-reduced-motion: no-preference) {
    .gradient-text-ready .dot-1 {
        animation: float-dot 5s infinite alternate ease-in-out;
    }

    .gradient-text-ready .dot-2 {
        animation: float-dot 7s infinite alternate-reverse ease-in-out;
    }

    .gradient-text-ready .dot-3 {
        animation: float-dot 6s infinite alternate ease-in-out;
    }
}

/* Animation Keyframes - will be loaded with non-critical CSS */
@keyframes float-main {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes float-left {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-7px) translateX(5px);
    }
}

@keyframes float-right {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-7px) translateX(-5px);
    }
}

@keyframes pulse-shape {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes rotate-shape {
    from {
        transform: translateX(-50%) rotate(45deg) scale(0.3);
    }

    to {
        transform: translateX(-50%) rotate(405deg) scale(0.3);
    }
}

@keyframes float-dot {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}



/* Apply decorative shape animations only when motion is not reduced */
@media (prefers-reduced-motion: no-preference) {

    /* Additional clock animations for gradient-ready state */
    .gradient-text-ready .left-clock {
        animation: float-left 7s infinite ease-in-out;
    }

    .gradient-text-ready .right-clock {
        animation: float-right 7s infinite ease-in-out;
    }

    /* Shape animations */
    .gradient-text-ready .shape-1 {
        animation: pulse-shape 10s infinite alternate;
    }

    .gradient-text-ready .shape-2 {
        animation: pulse-shape 8s infinite alternate-reverse;
    }

    .gradient-text-ready .shape-3 {
        animation: rotate-shape 15s infinite linear;
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */
/* Consolidated mobile media query for better maintainability and DRY principles */
@media (max-width: 768px) {

    /* Theme Toggle - Mobile positioning */
    .theme-toggle {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        position: fixed;
        bottom: 20px;
        right: 20px;
        margin-left: 0;
        box-shadow: var(--shadow-md);
        z-index: 100;
    }

    .theme-toggle-tooltip {
        display: none;
    }

    /* Navigation - Mobile menu styles */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        flex-direction: column;
        width: 100%;
        background-color: var(--card-bg);
        box-shadow: var(--shadow-md);
        padding: 2rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        gap: 1.5rem;
        z-index: 100;
    }

    .nav-menu.active {
        transform: translateY(0);
        height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Ensure navbar has fixed dimensions to prevent layout shifts */
    .nav-container {
        min-height: 70px;
    }

    .nav-links {
        min-height: 50px;
    }

    /* Hero Section - Mobile layout */
    .hero-section {
        min-height: 800px;
        flex-direction: column;
        padding: 3.5rem 1.5rem 2.5rem;
        gap: 2.5rem;
    }

    .hero-content {
        min-height: 250px;
        text-align: center;
    }

    .hero-image {
        min-height: 300px;
        aspect-ratio: 4/3;
    }

    /* Hero Typography - Mobile adjustments */
    h1 {
        font-size: 2.2rem;
        margin-bottom: 1.2rem;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 60%, var(--tertiary-color) 90%);
        -webkit-background-clip: text;
        background-clip: text;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-subtitle::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-actions {
        justify-content: center;
        gap: 1rem;
    }

    /* Hero Visual Elements - Mobile scaling */
    .hero-visuals {
        min-height: 400px;
        transform: scale(0.85);
    }

    .main-clock {
        width: 150px;
        height: 150px;
    }

    .left-clock,
    .right-clock {
        width: 80px;
        height: 80px;
    }

    .left-clock {
        left: 5%;
    }

    .right-clock {
        right: 5%;
    }

    /* Time Conversion Panels - Mobile layout */
    .conversion-result {
        width: 95%;
    }

    .time-panels {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }

    .time-panel {
        min-height: 180px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 85%;
        margin: 0 auto;
        max-width: none;
    }

    .time-value {
        font-size: 3.5rem;
        margin: 0.25rem 0;
        line-height: 1;
    }

    .time-location {
        font-size: 1.5rem;
        margin: 0.25rem 0;
    }

    .time-date {
        font-size: 1rem;
        margin: 0.25rem 0 0.5rem;
    }

    .conversion-arrow {
        transform: rotate(90deg);
        margin: 0.75rem 0;
        width: 50px;
        height: 50px;
    }

    /* Conversion Result Container - Mobile adjustments */
    #conversionResultContainer {
        padding: 0.5rem;
    }

    .result-container {
        margin: 1rem auto;
    }

    /* Central Action Buttons - Mobile layout */
    .central-actions {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        margin: 1rem 0;
        width: 100%;
    }

    .central-actions .btn-action {
        width: 44px;
        height: 44px;
    }

    .conversion-arrow {
        margin-bottom: 0.5rem;
    }

    /* Timezone Update Notification - Mobile positioning */
    .timezone-update-notification {
        left: 20px;
        right: 20px;
        top: 15px;
    }

    /* Promo Banner - Mobile layout */
    .promo-banner {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
    }

    .promo-icon {
        margin: 0 auto 0.75rem;
    }

    .promo-link {
        width: 100%;
        padding: 0.5rem;
        text-align: center;
        margin-bottom: 0.25rem;
    }

    /* General Section Adjustments - Prevent layout shifts */
    .section {
        min-height: 400px;
    }
}

/* Left and right clock random positions */
.left-clock .hour-hand {
    transform: translateX(-50%) rotate(var(--random-left-hour, 195deg));
}

.left-clock .minute-hand {
    transform: translateX(-50%) rotate(var(--random-left-minute, 280deg));
}

.right-clock .hour-hand {
    transform: translateX(-50%) rotate(var(--random-right-hour, 300deg));
}

.right-clock .minute-hand {
    transform: translateX(-50%) rotate(var(--random-right-minute, 75deg));
}