/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Deep Space Theme */
    --primary-bg: #0a0e27;
    --secondary-bg: #141b3d;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-gold: #f59e0b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cosmic: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Effects */
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.5);
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.5);
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.5);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Space Grotesk', monospace;
}

body {
    font-family: var(--font-primary);
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

/* ===================================
   VIDEO BACKGROUND
   =================================== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#youtube-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 14, 39, 0.85) 0%,
        rgba(20, 27, 61, 0.75) 50%,
        rgba(10, 14, 39, 0.85) 100%
    );
    backdrop-filter: blur(2px);
}

/* ===================================
   MAIN CONTAINER
   =================================== */
.main-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.content-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===================================
   HEADER
   =================================== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    animation: fadeInDown 1s ease-out;
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.title-line {
    display: block;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.5px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   CARDS CONTAINER
   =================================== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-lg) 0;
}

/* ===================================
   CARD STYLES
   =================================== */
.card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(20, 27, 61, 0.6);
    border-radius: 24px;
    padding: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 24px;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.3),
        0 0 40px rgba(139, 92, 246, 0.2),
        inset 0 0 20px rgba(139, 92, 246, 0.1);
}

#astrochart-card:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.4),
        0 0 50px rgba(139, 92, 246, 0.3);
}

#transitwheel-card:hover {
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 
        0 20px 60px rgba(6, 182, 212, 0.4),
        0 0 50px rgba(6, 182, 212, 0.3);
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.card:hover .card-glow {
    opacity: 1;
    animation: rotate 10s linear infinite;
}

#transitwheel-card .card-glow {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Icon Wrapper */
.icon-wrapper {
    width: 120px;
    height: 120px;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon {
    width: 100%;
    height: 100%;
    color: var(--accent-purple);
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
    transition: all 0.4s ease;
}

#transitwheel-card .icon {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5));
}

.card:hover .icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.8));
}

#transitwheel-card:hover .icon {
    filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.8));
    animation: pulse 2s ease-in-out infinite;
}

#astrochart-card:hover .icon {
    animation: rotate 20s linear infinite;
}

/* Card Title */
.card-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.card:hover .card-title {
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Description */
.card-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    transition: color 0.3s ease;
}

.card:hover .card-description {
    color: var(--text-primary);
}

/* Card Arrow */
.card-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    margin-top: auto;
}

.card-arrow svg {
    color: var(--accent-purple);
    transition: transform 0.4s ease;
}

#transitwheel-card .card-arrow {
    background: rgba(6, 182, 212, 0.2);
}

#transitwheel-card .card-arrow svg {
    color: var(--accent-cyan);
}

.card:hover .card-arrow {
    background: rgba(139, 92, 246, 0.4);
    transform: scale(1.1);
}

#transitwheel-card:hover .card-arrow {
    background: rgba(6, 182, 212, 0.4);
}

.card:hover .card-arrow svg {
    transform: translateX(4px);
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
    animation: fadeIn 1.5s ease-out;
}

.footer-text {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .main-container {
        padding: var(--spacing-md);
    }
    
    .header {
        margin-bottom: var(--spacing-xl);
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .card {
        padding: var(--spacing-lg);
    }
    
    .icon-wrapper {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: var(--spacing-sm);
    }
    
    .card {
        padding: var(--spacing-md);
        border-radius: 16px;
    }
    
    .icon-wrapper {
        width: 80px;
        height: 80px;
        margin-bottom: var(--spacing-md);
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.card:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 4px;
}

#transitwheel-card:focus-visible {
    outline-color: var(--accent-cyan);
}
