/* ==========================================
   TLEARNER ARCADE - DARK THEME
   ========================================== */

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

body.arcade-body {
    font-family: 'Orbitron', sans-serif;
    background: #0a0a0f;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Arcade Background */
.arcade-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* CRT Scan Lines Effect */
.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    opacity: 0.3;
}

/* Animated Stars */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 107, 107, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(78, 205, 196, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 230, 109, 0.3), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 107, 157, 0.3), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(78, 205, 196, 0.3), transparent),
        radial-gradient(1px 1px at 30% 80%, rgba(255, 230, 109, 0.3), transparent);
    background-size: 200% 200%;
    animation: starsMove 20s ease-in-out infinite;
}

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

/* Main Container */
.arcade-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.arcade-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.arcade-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-pixel {
    font-size: 4rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.logo-text {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 900;
    background: linear-gradient(90deg, #FF6B6B, #FFE66D, #4ECDC4, #FF6B9D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
    letter-spacing: 0.1em;
}

.arcade-tagline {
    font-size: clamp(0.7rem, 2vw, 1rem);
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 400;
}

/* Games Container */
.arcade-games {
    flex: 1;
    margin-bottom: 3rem;
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeIn 1s ease-out 0.3s both;
}

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

/* Arcade Card */
.arcade-card {
    position: relative;
    background: rgba(20, 20, 40, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.arcade-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FF6B6B, #FFE66D, #4ECDC4, #FF6B9D);
    opacity: 0;
    z-index: -1;
    border-radius: 15px;
    transition: opacity 0.3s ease;
}

.arcade-card:hover::before {
    opacity: 0.7;
}

.arcade-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 0 30px rgba(255, 107, 107, 0.4),
        0 0 60px rgba(78, 205, 196, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.5);
}

.card-screen {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Square aspect ratio */
    overflow: hidden;
    background: #000;
}

.game-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Perfect fit for square images */
    transition: transform 0.3s ease;
}

.arcade-card:hover .game-preview {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.arcade-card:hover .card-overlay {
    opacity: 1;
}

.play-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: #fff;
    background: linear-gradient(90deg, #FF6B6B, #FF6B9D);
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

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

.card-info {
    padding: 1.5rem;
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.game-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #FF6B6B, #FFE66D, #4ECDC4, #FF6B9D);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.arcade-card:hover .card-glow {
    opacity: 1;
    animation: neonGlow 1.5s ease-in-out infinite;
}

@keyframes neonGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 107, 107, 0.8); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 107, 1); }
}

/* Footer */
.arcade-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    margin-bottom: 1.5rem;
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.maker-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.maker-link:hover {
    color: #fff;
    border-color: rgba(255, 107, 107, 0.6);
    background: rgba(255, 107, 107, 0.1);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

.footer-bottom {
    margin-top: 1.5rem;
}

.copyright {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .arcade-main {
        padding: 1rem 0.5rem;
    }
    
    .arcade-header {
        margin-bottom: 2rem;
    }
    
    .logo-pixel {
        font-size: 3rem;
    }
    
    .games-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-screen {
        height: 200px;
    }
    
    .play-btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .arcade-logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo-pixel {
        font-size: 2.5rem;
    }
    
    .card-screen {
        height: 180px;
    }
    
    .card-info {
        padding: 1rem;
    }
}
