/* Wall-E Theme - Enhanced Visual Layer */

/* Nebula background effect */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(30, 58, 95, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(232, 168, 56, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(168, 216, 234, 0.06) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.slide-content {
    position: relative;
    z-index: 2;
}

/* Enhanced starfield */
.starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) ease-in-out infinite;
    opacity: 0;
}

.star.large {
    box-shadow: 0 0 4px 1px rgba(168, 216, 234, 0.6);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Shooting star */
.shooting-star {
    position: absolute;
    width: 80px;
    height: 1px;
    background: linear-gradient(270deg, rgba(255,255,255,0.9), transparent);
    animation: shoot 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes shoot {
    0% { transform: translate(-100px, -40px) rotate(18deg); opacity: 0; }
    5% { opacity: 1; }
    15% { transform: translate(250px, 80px) rotate(18deg); opacity: 0; }
    100% { opacity: 0; }
}

/* Wall-E Eyes (CSS Art) */
.walle-eyes {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.walle-eye {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #5a4a2a, #2a2010);
    border: 3px solid #8a7040;
    box-shadow:
        0 0 10px rgba(232, 168, 56, 0.3),
        inset 0 0 8px rgba(0,0,0,0.5);
    position: relative;
    animation: walleEyeBlink 4s ease-in-out infinite;
}

.walle-eye::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #e8a838, #c47f1a);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px rgba(232, 168, 56, 0.8);
}

@keyframes walleEyeBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

/* Glassmorphism cards */
.glass-card {
    background: rgba(26, 32, 53, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 216, 234, 0.15);
    border-radius: 16px;
    padding: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Enhanced buttons */
.btn-start,
.btn-next,
.btn-play {
    background: rgba(232, 168, 56, 0.1);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 14px 36px;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(232, 168, 56, 0.15);
}

.btn-start::before,
.btn-next::before,
.btn-play::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(232, 168, 56, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-start:active,
.btn-next:active,
.btn-play:active {
    background: rgba(232, 168, 56, 0.25);
    transform: scale(0.97);
    box-shadow: 0 0 25px rgba(232, 168, 56, 0.3);
}

.btn-start:active::before,
.btn-next:active::before,
.btn-play:active::before {
    opacity: 1;
}

/* Holographic scan line effect for puzzle pages */
.puzzle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--eve-blue), transparent);
    opacity: 0.3;
    animation: scanLine 4s linear infinite;
}

@keyframes scanLine {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Code digit enhanced */
.code-digit {
    background: rgba(26, 32, 53, 0.8);
    border: 1px solid rgba(232, 168, 56, 0.4);
    border-radius: 8px;
    box-shadow:
        0 0 10px rgba(232, 168, 56, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
    color: var(--gold-light);
    font-size: 1.4rem;
    transition: all var(--transition-fast);
}

.code-digit:focus {
    border-color: var(--gold);
    box-shadow:
        0 0 20px rgba(232, 168, 56, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Choice cards enhanced */
.choice-card {
    background: rgba(26, 32, 53, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 216, 234, 0.1);
    border-radius: 12px;
    padding: 18px 22px;
    color: var(--white-soft);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.choice-card:active {
    transform: scale(0.98);
    border-color: rgba(232, 168, 56, 0.4);
    box-shadow: 0 4px 20px rgba(232, 168, 56, 0.15);
}

/* Gift box enhanced */
.gift-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(78, 205, 196, 0.4));
    animation: float 3s ease-in-out infinite;
}

/* EVE silhouette decoration */
.eve-silhouette {
    width: 60px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.9), rgba(168, 216, 234, 0.6));
    border-radius: 50% 50% 40% 40%;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 30px rgba(168, 216, 234, 0.4);
    position: relative;
}

.eve-silhouette::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 8px;
    background: #1a2035;
    border-radius: 50%;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 4px rgba(100, 180, 255, 0.8);
}

/* Plant in boot */
.plant-boot {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.plant-boot::before {
    content: '🌱';
    font-size: 2rem;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    animation: float 2.5s ease-in-out infinite;
}

/* Floating particles */
.particle-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(232, 168, 56, 0.4);
    border-radius: 50%;
    animation: floatUp var(--float-duration, 8s) linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-20px) translateX(30px); opacity: 0; }
}

/* Stats enhanced */
.stat-number {
    font-size: 3.5rem;
    font-weight: 200;
    color: var(--white);
    line-height: 1;
    text-shadow: 0 0 20px rgba(168, 216, 234, 0.3);
}

/* Minesweeper board enhanced */
.ms-board {
    border: 2px solid rgba(232, 168, 56, 0.4);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(232, 168, 56, 0.1);
}

.ms-cell {
    background: rgba(21, 27, 46, 0.8);
    border-radius: 3px;
    transition: all var(--transition-fast);
}

.ms-cell:active:not(.revealed) {
    background: rgba(232, 168, 56, 0.15);
    box-shadow: inset 0 0 8px rgba(232, 168, 56, 0.2);
}

/* Letter page enhanced */
.letter {
    position: relative;
}

.letter::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(232, 168, 56, 0.3), transparent);
    border-radius: 50%;
    filter: blur(10px);
}

/* Progress bar glow */
.progress-fill {
    box-shadow: 0 0 8px rgba(232, 168, 56, 0.6);
}

/* Album photo enhanced */
.album-photo {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(168, 216, 234, 0.1);
}

/* Wall-E and EVE flying characters */
.character-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.flying-eve {
    position: absolute;
    width: 50px;
    height: 75px;
    background: url('../assets/images/eve.svg') no-repeat center/contain;
    animation: eveFly 18s ease-in-out infinite;
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(168, 216, 234, 0.5));
}

.flying-walle {
    position: absolute;
    width: 65px;
    height: 75px;
    background: url('../assets/images/walle.svg') no-repeat center/contain;
    animation: walleFly 22s ease-in-out infinite;
    animation-delay: 6s;
    opacity: 0;
    filter: drop-shadow(0 0 6px rgba(232, 168, 56, 0.3));
}

@keyframes eveFly {
    0% {
        transform: translate(-60px, 60vh) rotate(5deg);
        opacity: 0;
    }
    5% { opacity: 0.8; }
    25% { transform: translate(30vw, 35vh) rotate(-3deg); opacity: 0.8; }
    50% { transform: translate(55vw, 25vh) rotate(5deg); opacity: 0.8; }
    75% { transform: translate(80vw, 40vh) rotate(-2deg); opacity: 0.8; }
    95% { opacity: 0.8; }
    100% {
        transform: translate(110vw, 20vh) rotate(3deg);
        opacity: 0;
    }
}

@keyframes walleFly {
    0% {
        transform: translate(-80px, 70vh) rotate(-5deg);
        opacity: 0;
    }
    5% { opacity: 0.7; }
    20% { transform: translate(15vw, 55vh) rotate(3deg); opacity: 0.7; }
    40% { transform: translate(35vw, 45vh) rotate(-4deg); opacity: 0.7; }
    60% { transform: translate(55vw, 50vh) rotate(2deg); opacity: 0.7; }
    80% { transform: translate(75vw, 35vh) rotate(-3deg); opacity: 0.7; }
    95% { opacity: 0.7; }
    100% {
        transform: translate(110vw, 30vh) rotate(5deg);
        opacity: 0;
    }
}
