@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

/* Welcome screen specific styles - scoped to prevent conflicts */
#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: #0a0e27;
    color: white;
}

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

/* Animated dark gradient background matching game theme */
#welcome-screen .space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(145deg, #0a0e27 0%, #1a1f3a 50%, #0f172a 100%);
}

/* Subtle animated grid pattern */
#welcome-screen .stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(96, 165, 250, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(96, 165, 250, 0.2), transparent),
        radial-gradient(1px 1px at 50px 50px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 80px 10px, rgba(255, 255, 255, 0.1), transparent);
    background-repeat: repeat;
    background-size: 100px 100px;
    animation: welcome-starsMove 60s linear infinite;
    opacity: 0.4;
}

@keyframes welcome-starsMove {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, 50px); }
}

/* Grid overlay matching game aesthetic */
#welcome-screen .grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(42, 63, 95, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 63, 95, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: welcome-gridPulse 4s ease-in-out infinite;
}

@keyframes welcome-gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.1; }
}

/* Floating burger showcase */
#welcome-screen .burger-showcase {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: welcome-showcaseFloat 4s ease-in-out infinite;
}

@keyframes welcome-showcaseFloat {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-55%) rotate(3deg); }
}

#welcome-screen .burger-3d {
    width: 250px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    animation: welcome-burgerRotate 20s linear infinite;
}

@keyframes welcome-burgerRotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

/* Burger container with subtle blue glow */
#welcome-screen .burger-img {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #2a3f5f, #1a1f3a);
    border-radius: 50%;
    box-shadow: 
        0 0 40px rgba(96, 165, 250, 0.2),
        0 0 80px rgba(96, 165, 250, 0.1),
        inset -20px -20px 40px rgba(0, 0, 0, 0.5),
        inset 20px 20px 40px rgba(96, 165, 250, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
}

/* Premium burger skins preview */
#welcome-screen .skin-preview {
    position: absolute;
    bottom: 5%;
    right: 5%;
    display: flex;
    gap: 15px;
    z-index: 1000;
    pointer-events: auto;
}

#welcome-screen .skin-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #1a1f3a, #0f172a);
    border: 2px solid #2a3f5f;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#welcome-screen .skin-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.4), transparent);
    transition: left 0.6s;
}

#welcome-screen .skin-bubble:hover {
    transform: translateY(-2px) scale(1.1);
    border-color: #60a5fa;
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.3);
}

#welcome-screen .skin-bubble:hover::before {
    left: 100%;
}

#welcome-screen .skin-bubble.active {
    border-color: #60a5fa;
    background: linear-gradient(145deg, #3b5998, #2a3f5f);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

/* Main container */
#welcome-screen .main-container {
    position: relative;
    z-index: 100;
    height: 100vh;
    display: flex;
    align-items: center;
    padding-left: 10%;
}

/* Logo section */
#welcome-screen .logo-container {
    margin-bottom: 40px;
    position: relative;
}

#welcome-screen .game-logo {
    font-size: 72px;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 5px;
    position: relative;
    text-shadow: 0 0 80px rgba(251, 191, 36, 0.4);
}

#welcome-screen .game-logo::before {
    content: 'BURGER FLIPPER';
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(3px);
    opacity: 0.5;
    z-index: -1;
}

#welcome-screen .game-subtitle {
    font-size: 24px;
    color: #8b92a9;
    letter-spacing: 10px;
    margin-top: -10px;
    margin-left: 5px;
    font-weight: 400;
    text-transform: uppercase;
    animation: welcome-subtitleGlow 3s ease-in-out infinite;
}

@keyframes welcome-subtitleGlow {
    0%, 100% { opacity: 0.8; text-shadow: 0 0 10px rgba(96, 165, 250, 0.3); }
    50% { opacity: 1; text-shadow: 0 0 20px rgba(96, 165, 250, 0.5); }
}

/* Menu section */
#welcome-screen .menu-section {
    position: relative;
    max-width: 450px;
}

/* Buttons matching game style */
#welcome-screen .game-button {
    display: block;
    width: 100%;
    padding: 18px 30px;
    margin: 12px 0;
    background: linear-gradient(145deg, #1a1f3a, #0f172a);
    border: 2px solid #2a3f5f;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#welcome-screen .game-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.2), transparent);
    transition: left 0.6s;
}

#welcome-screen .game-button::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    transition: all 0.3s;
    font-size: 20px;
}

#welcome-screen .game-button:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: #3b5998;
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3);
}

#welcome-screen .game-button:hover::before {
    left: 100%;
}

#welcome-screen .game-button:hover::after {
    right: 20px;
}

/* Primary button special styling - matches game's flip button */
#welcome-screen .btn-primary {
    font-size: 20px;
    padding: 22px 35px;
    background: radial-gradient(circle, #fbbf24, #f59e0b);
    border: 3px solid #d97706;
    color: #000;
    font-weight: 700;
    animation: welcome-primaryPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

@keyframes welcome-primaryPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(251, 191, 36, 0.6);
    }
}

#welcome-screen .btn-primary::after {
    color: #000;
}

/* Secondary buttons */
#welcome-screen .btn-secondary {
    background: linear-gradient(135deg, #3b5998, #60a5fa);
    border-color: #60a5fa;
    color: #fff;
}

/* Save data card */
#welcome-screen .save-card {
    background: linear-gradient(145deg, #1a1f3a, #0f172a);
    border: 2px solid #2a3f5f;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#welcome-screen .save-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #60a5fa, transparent);
    animation: welcome-scanLine 3s linear infinite;
}

@keyframes welcome-scanLine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

#welcome-screen .player-tag {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

#welcome-screen .player-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

#welcome-screen .player-info {
    flex: 1;
}

#welcome-screen .player-name {
    color: #60a5fa;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 3px;
}

#welcome-screen .player-stats {
    color: #8b92a9;
    font-size: 14px;
    display: flex;
    gap: 15px;
}

#welcome-screen .stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

#welcome-screen .stat-icon {
    color: #fbbf24;
}

/* Corner accents */
#welcome-screen .corner-accent {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid #2a3f5f;
    opacity: 0.5;
}

#welcome-screen .corner-top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

#welcome-screen .corner-top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

#welcome-screen .corner-bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

#welcome-screen .corner-bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* Social links */
#welcome-screen .social-links {
    position: absolute;
    bottom: 30px;
    left: 10%;
    display: flex;
    gap: 15px;
    z-index: 200;
}

#welcome-screen .social-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #1a1f3a, #0f172a);
    border: 2px solid #2a3f5f;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#welcome-screen .social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    border-color: #60a5fa;
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.3);
}

/* Version tag */
#welcome-screen .version-tag {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(26, 31, 58, 0.8);
    border: 1px solid #2a3f5f;
    padding: 8px 16px;
    font-size: 12px;
    color: #8b92a9;
    letter-spacing: 1px;
    border-radius: 6px;
}

/* Animated accent lines */
#welcome-screen .accent-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #60a5fa, transparent);
    animation: welcome-lineSlide 3s linear infinite;
}

#welcome-screen .line-1 {
    top: 20%;
    width: 200px;
    left: -200px;
    animation-delay: 0s;
}

#welcome-screen .line-2 {
    top: 50%;
    width: 150px;
    left: -150px;
    animation-delay: 1s;
}

#welcome-screen .line-3 {
    top: 80%;
    width: 250px;
    left: -250px;
    animation-delay: 2s;
}

@keyframes welcome-lineSlide {
    to { left: 100%; }
}

/* Hide returning player content by default */
#welcome-screen .returning-content { 
    display: none; 
}

/* Particle effects */
#welcome-screen .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #60a5fa;
    border-radius: 50%;
    opacity: 0;
    animation: welcome-particleFloat 10s linear infinite;
}

@keyframes welcome-particleFloat {
    0% {
        opacity: 0;
        transform: translate(0, 100vh) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(10px, 80vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translate(-10px, 20vh) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
}

#welcome-screen .particle-1 { left: 10%; animation-delay: 0s; }
#welcome-screen .particle-2 { left: 30%; animation-delay: 2s; }
#welcome-screen .particle-3 { left: 50%; animation-delay: 4s; }
#welcome-screen .particle-4 { left: 70%; animation-delay: 6s; }
#welcome-screen .particle-5 { left: 90%; animation-delay: 8s; }

/* Fade animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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