/* index.css - Tela Principal QuadNex */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Mono", monospace;
    background-color: #0c5a2b;
    background-image: url('/games/QuadNex/assets/img/bg1.png');
    background-size: 30%;
    background-blend-mode: multiply;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    padding: 0;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(45deg, #00000099, #00000033, #000000cc);
    z-index: -1;
    pointer-events: none;
} 

.lobby-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px 15px;
}

.lobby-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 900;
    color: gold;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin: 0;
    text-shadow: 0 3px 12px rgba(255, 215, 0, 0.4);
}

.subtitle {
    font-size: 0.95rem;
    color: #a0aec0;
    margin-top: 8px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* Card do Jogo */
.game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.game-card:hover:not(.locked) {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 215, 0, 0.2);
    border-color: gold;
}

.game-image {
    height: 140px;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.game-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.game-image h2 {
    position: relative;
    margin: 0;
    font-size: 1.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 2;
}

/* Fundo Personalizado por Jogo */
.uno-bg { 
    background: linear-gradient(135deg, #cc0000, #ff3333);
}
.truco-bg { 
    background: linear-gradient(135deg, #0b2b1a, #1a4d2e);
}
.lock-bg { 
    background: linear-gradient(135deg, #333, #555);
    filter: grayscale(100%); 
}

.game-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: rgba(0,0,0,0.4);
    gap: 12px;
}

.game-info p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.4;
    font-size: 0.9rem;
    flex: 1;
}

.button-group {
    display: flex;
    gap: 8px;
}

.btn-play {
    background: linear-gradient(90deg, #b26c15, #d4af37);
    color: #111;
    border: none;
    padding: 11px 0;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    width: 100%;
    letter-spacing: 0.5px;
}

.btn-play:hover:not(:disabled) {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.btn-play:active:not(:disabled) {
    transform: translateY(0);
}

.btn-online, .btn-offline {
    flex: 1;
}

.btn-friend {
    background: rgba(0, 0, 0, 0.6);
    color: gold;
    border: 1px solid gold;
}

.btn-friend:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Card Bloqueado */
.game-card.locked {
    cursor: not-allowed;
    opacity: 0.6;
}

.game-card.locked .btn-play {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .lobby-container {
        padding: 15px 12px;
    }
    
    .lobby-header {
        margin-bottom: 20px;
    }
    
    .logo { 
        font-size: 1.8rem;
        letter-spacing: 4px;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .games-grid { 
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .game-image {
        height: 120px;
        padding: 12px;
    }
    
    .game-image h2 {
        font-size: 1.3rem;
    }
    
    .game-info {
        padding: 15px;
        gap: 10px;
    }
    
    .game-info p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .btn-play {
        padding: 10px 0;
        font-size: 0.9rem;
    }
}

/* Mobile muito pequeno */
@media (max-width: 360px) {
    .logo {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }
    
    .game-image {
        height: 100px;
    }
    
    .game-image h2 {
        font-size: 1.1rem;
    }
    
    .btn-play {
        padding: 9px 0;
        font-size: 0.85rem;
    }
}

/* Gatilho no Header */
.profile-trigger {
    position: fixed;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.7);
    padding: 5px;
    border-radius: 50px;
    border: 1px solid gold;
    cursor: pointer;
    z-index: 100;
}
.profile-trigger img { width: 35px; height: 35px; border-radius: 50%; }

img#mainAvatar {
    width: 100%;
}

/* O Menu Lateral */
.drawer {
    position: fixed;
    top: 0;
    right: -320px; /* Escondido */
    width: 300px;
    height: 100%;
    background: #1a1a1a;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    transition: 0.4s ease;
    z-index: 1000;
    padding: 20px;
    color: white;
}
.drawer.active { right: 0; }

.drawer-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 999;
}
.drawer-overlay.active { display: block; }

.drawer input {
    display: block;
    margin: 10px auto;
    padding: 10px;
}

/* Grid de Avatares */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
    max-height: 250px;
    overflow-y: auto;
}
.avatar-item {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}
.avatar-item:hover { border-color: gold; }
.avatar-item.selected { border-color: #00ff00; background: rgba(0,255,0,0.2); }

#inputNickname {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    background: #333;
    border: 1px solid #555;
    color: white;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1rem;
}