/* USATime.live - Modern CSS for Improved Homepage */

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

:root {
    /* American Color Palette */
    --usa-blue: #002868;
    --usa-red: #bf0a30;
    --usa-white: #ffffff;
    --navy-blue: #1e3a8a;
    --light-blue: #3b82f6;
    --patriot-red: #dc2626;
    --light-red: #ef4444;

    /* Modern Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--usa-blue) 0%, var(--navy-blue) 100%);
    color: var(--usa-white);
    padding: var(--space-lg) 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--usa-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-text:hover {
    opacity: 0.9;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
    margin: 0;
}

.nav-list a {
    color: var(--usa-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.nav-list a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--usa-red) 0%, var(--patriot-red) 50%, var(--usa-blue) 100%);
    color: var(--usa-white);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23stars)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: var(--space-lg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.utc-time {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    margin: var(--space-xl) auto;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.utc-time h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

.main-clock {
    background: rgba(0, 0, 0, 0.2);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    margin: var(--space-md) auto;
}

.time-display {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--usa-white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.1em;
}

/* Section Styles */
section {
    padding: var(--space-3xl) 0;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--space-2xl);
    color: var(--usa-blue);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--usa-red), var(--usa-blue));
    border-radius: 2px;
}

/* Major Cities Grid */
.major-cities {
    background: var(--usa-white);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.city-card {
    background: var(--usa-white);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.city-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--usa-red), var(--usa-blue));
}

.city-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--light-blue);
}

.city-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--usa-blue);
}

.city-card h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.city-card h3 a:hover {
    color: var(--usa-red);
}

.city-time {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--usa-red);
}

.timezone-info {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Time Zones Section */
.time-zones {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.timezone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.timezone-card {
    background: var(--usa-white);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.timezone-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--usa-blue);
}

.timezone-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--usa-blue);
}

.timezone-card h3 a {
    text-decoration: none;
    color: inherit;
}

.timezone-card h3 a:hover {
    color: var(--usa-red);
}

.timezone-time {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.timezone-states {
    margin-top: var(--space-md);
    font-size: 0.9rem;
}

.timezone-states a {
    color: var(--usa-blue);
    text-decoration: none;
    font-weight: 500;
}

.timezone-states a:hover {
    color: var(--usa-red);
    text-decoration: underline;
}

/* Tools Section */
.tools-section {
    background: var(--usa-white);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.tool-card {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--usa-white) 100%);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-200);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--usa-blue);
}

.tool-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--usa-blue);
}

.tool-card h3 a {
    text-decoration: none;
    color: inherit;
}

.tool-card h3 a:hover {
    color: var(--usa-red);
}

.tool-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--usa-white);
    padding: var(--space-3xl) 0 var(--space-xl) 0;
    margin-top: var(--space-3xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--usa-white);
    border-bottom: 2px solid var(--usa-red);
    padding-bottom: var(--space-sm);
    display: inline-block;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-sm);
}

.links-grid a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.9rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.links-grid a:hover {
    color: var(--usa-white);
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--usa-red);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid var(--gray-600);
    padding-top: var(--space-lg);
    text-align: center;
}

.footer-info p {
    color: var(--gray-400);
    margin-bottom: var(--space-md);
}

.footer-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    font-size: 0.85rem;
}

.footer-keywords span {
    color: var(--gray-500);
    background: var(--gray-800);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-700);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .time-display {
        font-size: 1.8rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .nav-list {
        gap: var(--space-md);
    }

    .nav-list a {
        font-size: 1rem;
        padding: var(--space-xs) var(--space-sm);
    }

    .cities-grid,
    .timezone-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

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

    .footer-keywords {
        justify-content: center;
        gap: var(--space-sm);
    }

    .footer-keywords span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .hero-section {
        padding: var(--space-2xl) 0;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .utc-time {
        padding: var(--space-lg);
    }

    .time-display {
        font-size: 1.5rem;
    }

    .city-card,
    .timezone-card,
    .tool-card {
        padding: var(--space-lg);
    }

    .links-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--usa-blue);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .tools-section {
        display: none;
    }

    * {
        color: black !important;
        background: white !important;
    }
}