/* =====================================================
   VITALINK SPIRITS - LANDING PAGE STYLES
   Single-scroll marketing homepage for non-logged-in users
   ===================================================== */

/* Base Landing Page Styles */
.landing-page {
    background: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.landing-page * {
    box-sizing: border-box;
}

/* Section Base */
.landing-section {
    padding: 80px 24px;
    width: 100%;
}

.landing-section > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.landing-section-dark {
    background: #0a0a0a;
}

.landing-section-accent {
    background: linear-gradient(180deg, #000 0%, #0d1117 50%, #000 100%);
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
}

.hero-logo {
    width: 100%;
    max-width: 400px;
    margin-bottom: 24px;
}

.hero-tagline {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 50%, #F472B6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 40px 0;
    max-width: 500px;
}

/* Spirit Showcase in Hero */
.hero-spirits {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.hero-spirit {
    width: 100px;
    height: 100px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    animation: spirit-float 3s ease-in-out infinite;
}

.hero-spirit:nth-child(1) { animation-delay: 0s; }
.hero-spirit:nth-child(2) { animation-delay: 0.5s; }
.hero-spirit:nth-child(3) { animation-delay: 1s; }
.hero-spirit:nth-child(4) { animation-delay: 1.5s; }

@keyframes spirit-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* CTA Buttons */
.cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1.25rem;
    font-family: "VT323", monospace;
    background: #D0BCFF !important;
    background-color: #D0BCFF !important;
    color: #371E73 !important;
    border: none !important;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    min-width: 250px;
    max-width: 300px;
    height: auto;
    flex-shrink: 0;
    flex-grow: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
}

.cta-primary:hover {
    background: #0056b3 !important;
    background-color: #0056b3 !important;
    transform: translateY(-2px);
}

.cta-primary:focus {
    outline: none;
    background: #0056b3 !important;
    background-color: #0056b3 !important;
}

.cta-primary:active {
    background: #004494 !important;
    background-color: #004494 !important;
}

.cta-primary svg {
    width: 24px;
    height: 24px;
}

.cta-secondary {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    text-decoration: none;
    margin-top: 48px;
}

.cta-secondary:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Battle CTA Button */
.cta-battle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1.25rem;
    font-family: "VT323", monospace;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 200px;
}

.cta-battle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
    color: #fff;
}

.cta-battle:focus {
    outline: none;
    border-color: #fff;
}

.cta-battle:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Scroll indicator */
.scroll-indicator {
    margin-top: 16px;
    margin-bottom: 40px;
    animation: bounce 2s infinite;
    opacity: 0.5;
}

.scroll-indicator svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* =====================================================
   CONTENT SECTIONS
   ===================================================== */

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #fff;
}

.section-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.feature-card {
    background: #18191c;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    image-rendering: pixelated;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #fff;
}

.feature-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

/* =====================================================
   MEET YOUR SPIRIT SECTION
   ===================================================== */

.spirit-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Spirit display wrapper for overlay support */
.spirit-display-wrapper-landing {
    position: relative;
    display: inline-block;
    width: 200px;
    height: 200px;
}

.spirit-showcase-img {
    width: 200px;
    height: 200px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Mood overlay - positioned centered over spirit */
.spirit-mood-overlay-landing {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spirit-mood-overlay-landing img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.spirit-mood-gallery {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.spirit-mood-thumb {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
    background: #18191c;
    padding: 4px;
}

.spirit-mood-thumb:hover,
.spirit-mood-thumb.active {
    border-color: var(--md-sys-color-primary, #007BFF);
}

/* =====================================================
   GROWTH SECTION - HP/FP Bars Preview
   ===================================================== */

.growth-demo {
    background: #18191c;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    margin: 0 auto;
}

.growth-bar-container {
    margin-bottom: 24px;
}

.growth-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.growth-bar-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.growth-bar-value {
    color: rgba(255, 255, 255, 0.7);
}

.growth-bar {
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.growth-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 1s ease;
}

.growth-bar-fill.hp {
    background: linear-gradient(90deg, #F87171, #EF4444);
    width: 85%;
}

.growth-bar-fill.fp {
    background: linear-gradient(90deg, #60A5FA, #3B82F6);
    width: 70%;
}

.growth-bar-fill.xp {
    background: linear-gradient(90deg, #FBBF24, #F59E0B);
    width: 60%;
}

.growth-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.growth-stat {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.growth-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.growth-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* =====================================================
   EVOLUTION SECTION
   ===================================================== */

.evolution-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 32px 0;
}

.evolution-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.evolution-spirit {
    width: 100px;
    height: 100px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    margin-bottom: 8px;
}

.evolution-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.evolution-arrow {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
}

/* =====================================================
   BATTLE DEMO SECTION
   ===================================================== */

.battle-demo-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 280px;
    margin: 0 auto;
    background: #0a0a12;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Arena Background - Row visualization (5 visible rows: 6 at top to 2 at bottom) */
.demo-arena-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.demo-arena-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

/* Row heights to simulate perspective - bottom rows larger */
.demo-arena-row:nth-child(1) { flex: 0.6; }  /* Row 6 (top, smallest) */
.demo-arena-row:nth-child(2) { flex: 0.8; }  /* Row 5 - enemy active */
.demo-arena-row:nth-child(3) { flex: 1.0; }  /* Row 4 */
.demo-arena-row:nth-child(4) { flex: 1.3; }  /* Row 3 */
.demo-arena-row:nth-child(5) { flex: 1.6; }  /* Row 2 - ally active (bottom, largest) */

.demo-row-ally {
    background: #1e3a5f;
}

.demo-row-ally-active {
    background: #264b7a;
}

.demo-row-enemy {
    background: #4a2832;
}

.demo-row-enemy-active {
    background: #5c3340;
}

/* Enemy Section - positioned in row 5 area (middle red row) */
.demo-enemy-section {
    position: absolute;
    top: -12%;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 10;
}

/* Enemy info below sprite */
.demo-enemy-section .demo-spirit-info {
    order: 2;
}

.demo-enemy-section .demo-sprite-wrapper {
    order: 1;
}

/* Ally Section - positioned in row 2 area (bottom) */
.demo-ally-section {
    position: absolute;
    bottom: -10px;
    left: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    z-index: 10;
}

/* Ally info above sprite */
.demo-ally-section .demo-spirit-info {
    order: 1;
}

.demo-ally-section .demo-sprite-wrapper {
    order: 2;
}

/* Spirit Info Panel */
.demo-spirit-info {
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.demo-spirit-info-right {
    text-align: right;
}

.demo-spirit-info-left {
    text-align: left;
}

.demo-spirit-name {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: #fff;
}

.demo-highlight {
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.demo-level {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: 4px;
}


/* Sprite Wrapper */
.demo-sprite-wrapper {
    position: relative;
    flex-shrink: 0;
}

/* Ally sprite - larger */
.demo-ally-section .demo-sprite-wrapper {
    width: 120px;
    height: 120px;
}

.demo-ally-section .demo-battle-sprite {
    width: 120px;
    height: 120px;
}

/* Enemy sprite */
.demo-enemy-section .demo-sprite-wrapper {
    width: 100px;
    height: 100px;
}

.demo-enemy-section .demo-battle-sprite {
    width: 100px;
    height: 100px;
}

.demo-battle-sprite {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    object-fit: contain;
}

/* Hit overlay for damage VFX */
.demo-hit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-hit-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* Projectile Container */
.demo-projectile-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.demo-projectile {
    position: absolute;
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}


/* Battle Animations */
@keyframes demo-cast {
    0%   { transform: scale(1) rotate(0deg); }
    25%  { transform: scale(1.1) rotate(3deg); }
    50%  { transform: scale(1.15) rotate(0deg); }
    75%  { transform: scale(1.1) rotate(-3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes demo-tackle {
    0%   { transform: translateX(0px); }
    25%  { transform: translateX(-20px); }
    50%  { transform: translateX(-40px); }
    75%  { transform: translateX(-20px); }
    100% { transform: translateX(0px); }
}

@keyframes demo-shake {
    0%, 100% { transform: translateX(0px); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-6px); }
}

@keyframes demo-projectile-fly {
    0%   { transform: translate(0, 0) scale(0.8); opacity: 1; }
    100% { transform: translate(300px, -180px) scale(1); opacity: 0; }
}

.demo-casting {
    animation: demo-cast 0.6s ease !important;
}

.demo-tackling {
    animation: demo-tackle 0.5s ease !important;
}

.demo-shaking {
    animation: demo-shake 0.4s ease !important;
}

/* Responsive */
@media (max-width: 480px) {
    .battle-demo-container {
        height: 200px;
    }
    
    .demo-ally-section .demo-sprite-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .demo-ally-section .demo-battle-sprite {
        width: 80px;
        height: 80px;
    }
    
    .demo-enemy-section .demo-sprite-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .demo-enemy-section .demo-battle-sprite {
        width: 60px;
        height: 60px;
    }
    
    .demo-spirit-info {
        padding: 4px 8px;
    }
    
    .demo-spirit-name {
        font-size: 0.75rem;
    }
    
    .demo-projectile {
        width: 28px;
        height: 28px;
    }
    
    .demo-enemy-section {
        top: -10%;
        right: 8px;
        gap: 2px;
    }
    
    .demo-ally-section {
        left: 8px;
        gap: 6px;
    }
}

/* =====================================================
   SPIRIT GRID - A Growing World
   ===================================================== */

.spirit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 16px;
    max-width: 600px;
    margin: 40px auto 0;
}

.spirit-grid-item {
    aspect-ratio: 1;
    background: #18191c;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.spirit-grid-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.spirit-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.spirit-grid-item.mystery {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spirit-grid-item.mystery img {
    filter: brightness(0);
    opacity: 0.4;
}

.mystery-icon {
    font-size: 4rem;
    font-family: "VT323", monospace;
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
}

/* =====================================================
   FINAL CTA SECTION
   ===================================================== */

.final-cta {
    text-align: center;
    padding: 100px 24px;
    background: linear-gradient(180deg, #000 0%, #0d1117 100%);
}

.final-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.final-cta-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 40px 0;
}

/* =====================================================
   FOOTER
   ===================================================== */

.landing-footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-footer-logo {
    width: 150px;
    margin-bottom: 24px;
    opacity: 0.7;
}

.landing-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.landing-footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.landing-footer-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* =====================================================
   TYPE BADGES
   ===================================================== */

.type-badge-landing {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.type-badge-landing.type-core { background-color: #4CAF50; color: white; }
.type-badge-landing.type-guardian { background-color: #2196F3; color: white; }
.type-badge-landing.type-anomaly { background-color: #9C27B0; color: white; }
.type-badge-landing.type-decay { background-color: #795548; color: white; }

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .hero-tagline {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-spirit {
        width: 75px;
        height: 75px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .landing-section {
        padding: 60px 16px;
    }
    
    .landing-section > * {
        max-width: 100%;
    }
    
    .evolution-chain {
        gap: 8px;
    }
    
    .evolution-spirit {
        width: 70px;
        height: 70px;
    }
    
    .evolution-arrow {
        font-size: 1.5rem;
    }
    
    .battle-preview {
        gap: 20px;
    }
    
    .battle-spirit-img {
        width: 80px;
        height: 80px;
    }
    
    .battle-vs {
        font-size: 1.8rem;
    }
    
    .cta-primary {
        min-width: 200px;
        padding: 14px 24px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-spirits {
        gap: 8px;
    }
    
    .hero-spirit {
        width: 62px;
        height: 62px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .spirit-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

/* Fade in on scroll (add via JS if desired) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Subtle glow animation for CTA - using outline glow to avoid background issues */
.pulse {
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 123, 255, 0.7);
    }
}
