/* ============================================================
   ITAY'S GAMES - LAUNCHER STYLES
   ============================================================ */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;700&family=Press+Start+2P&display=swap');

/* Root Variables */
:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #1a1a2e;
    --accent-cyan: #00f0ff;
    --accent-pink: #ff00aa;
    --accent-gold: #ffd700;
    --text-primary: #ffffff;
    --text-secondary: #8888aa;
    --glass-bg: rgba(20, 20, 40, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.5);
    --glow-pink: 0 0 20px rgba(255, 0, 170, 0.5);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main Container */
#launcher {
    min-height: 100vh;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a12 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    overflow: hidden;
    position: relative;
}

/* Particle Background */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* Logo */
.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: var(--glow-cyan), var(--glow-pink);
    margin-bottom: 60px;
    z-index: 10;
    animation: logoGlow 3s ease-in-out infinite;
    text-align: center;
}

.logo span {
    color: var(--accent-cyan);
}

@keyframes logoGlow {
    0%, 100% { text-shadow: var(--glow-cyan), var(--glow-pink); }
    50% { text-shadow: 0 0 40px rgba(0, 240, 255, 0.8), 0 0 60px rgba(255, 0, 170, 0.6); }
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    width: 100%;
    z-index: 10;
}

/* Game Card */
.game-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan), 0 20px 40px rgba(0, 0, 0, 0.4);
}

.game-card.selected {
    border-color: var(--accent-pink);
    box-shadow: var(--glow-pink), 0 0 60px rgba(255, 0, 170, 0.3);
}

/* Card Preview Image */
.card-preview {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4e 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--glass-bg));
}

/* Fallback preview for missing images */
.card-preview-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    text-align: center;
    padding: 20px;
    text-shadow: var(--glow-cyan);
}

/* Card Content */
.card-content {
    padding: 20px;
}

.card-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.card-subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Play Button */
.play-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-pink) 100%);
    border: none;
    border-radius: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

.play-btn:active {
    transform: scale(0.98);
}

/* Locked Card */
.game-card.locked {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.game-card.locked .play-btn {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.game-card.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
}

.locked-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0.8;
}

/* Card Stats */
.card-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.stat {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-value {
    color: var(--accent-gold);
    font-weight: 700;
}

/* Navigation Hint */
.nav-hint {
    position: fixed;
    bottom: 30px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    z-index: 10;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Settings Button */
.settings-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 100;
}

.settings-btn:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: rotate(90deg);
}

.settings-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
}

/* Transition Effect */
body.transitioning {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 32px;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
    }
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.2);
}

.modal-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    text-shadow: var(--glow-cyan);
}

.modal-content p {
    font-family: 'Rajdhani', sans-serif;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.modal-content input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s;
}

.modal-content input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.modal-content input::placeholder {
    color: var(--text-secondary);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.primary-btn, .secondary-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-pink) 100%);
    color: var(--bg-primary);
}

.primary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--accent-pink);
    color: var(--accent-pink);
}

.secondary-btn:hover {
    background: var(--accent-pink);
    color: var(--bg-primary);
}

.error {
    color: #ff4444 !important;
    font-size: 14px !important;
    min-height: 20px;
}

.hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 15px;
}

.user-display {
    position: fixed;
    top: 30px;
    left: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 10px 20px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    color: var(--accent-cyan);
    z-index: 100;
}
