/* ==================================
   MAFIA NIGHT - Dark & Gold Theme
   style.css
================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

:root{
    --bg:#0a0a0a;
    --card:#111111;
    --gold:#d4af37;
    --gold-light:#ffd86b;
    --text:#ffffff;
    --border:#2a2a2a;
}

body{
    background:var(--bg);
    color:var(--text);
    min-height:100vh;
    overflow-x:hidden;
}

/* Background */

.background{
    position:fixed;
    inset:0;
    background:
    radial-gradient(circle at top,
    rgba(212,175,55,.15),
    transparent 40%),
    linear-gradient(
    180deg,
    #0a0a0a,
    #050505
    );
    z-index:-1;
}

/* Header */

header{
    text-align:center;
    padding:40px 20px;
}

header h1{
    color:var(--gold);
    font-size:3rem;
    letter-spacing:2px;
    text-shadow:0 0 20px rgba(212,175,55,.5);
}

header p{
    color:#cfcfcf;
    margin-top:10px;
}

/* Shared Cards */

.card,
.players-panel,
.judge-panel,
.timer-section,
.role-section,
.chat-section,
.voice-section,
.status-section{
    width:min(1100px,92%);
    margin:20px auto;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:20px;
    padding:25px;
    box-shadow:
    0 0 25px rgba(0,0,0,.4),
    inset 0 0 1px rgba(255,255,255,.05);
}

h2{
    color:var(--gold);
    margin-bottom:15px;
}

/* Lobby */

.lobby{
    width:min(1100px,92%);
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:20px;
}

input{
    width:100%;
    padding:14px;
    margin-top:10px;
    border-radius:12px;
    border:1px solid var(--border);
    background:#0f0f0f;
    color:white;
    outline:none;
}

input:focus{
    border-color:var(--gold);
}

/* Buttons */

button{
    width:100%;
    margin-top:12px;
    padding:14px;
    border:none;
    border-radius:12px;
    cursor:pointer;
    font-weight:700;
    background:linear-gradient(
    135deg,
    var(--gold),
    var(--gold-light)
    );
    color:#000;
    transition:.25s;
}

button:hover{
    transform:translateY(-2px);
    box-shadow:0 0 20px rgba(212,175,55,.4);
}

/* Players */

.player-list{
    display:grid;
    gap:10px;
}

.player{
    padding:15px;
    border-radius:12px;
    background:#171717;
    border:1px solid var(--border);
}

/* Judge */

.judge-grid{
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(180px,1fr));
    gap:15px;
}

/* Timer */

#timer{
    font-size:4rem;
    text-align:center;
    color:var(--gold);
    font-weight:700;
    text-shadow:0 0 25px rgba(212,175,55,.5);
}

/* Role Card */

.role-card{
    max-width:400px;
    margin:auto;
    text-align:center;
    padding:30px;
    border-radius:20px;
    border:2px solid var(--gold);
    background:
    linear-gradient(
    180deg,
    #171717,
    #101010
    );
    box-shadow:
    0 0 25px rgba(212,175,55,.25);
}

.role-icon{
    font-size:4rem;
    margin-bottom:15px;
}

.role-card h3{
    color:var(--gold);
    margin-bottom:10px;
    letter-spacing:1px;
}

.role-card p{
    color:#ddd;
    line-height:1.7;
}

/* Chat */

.chat-box{
    height:300px;
    overflow-y:auto;
    background:#0d0d0d;
    border-radius:12px;
    border:1px solid var(--border);
    padding:15px;
}

.message{
    background:#171717;
    padding:10px;
    border-radius:10px;
    margin-bottom:10px;
}

.chat-input{
    display:flex;
    gap:10px;
    margin-top:15px;
}

.chat-input input{
    flex:1;
    margin-top:0;
}

.chat-input button{
    width:150px;
    margin-top:0;
}

/* Voice */

.voice-buttons{
    display:flex;
    gap:15px;
}

.voice-buttons button{
    flex:1;
}

/* Status */

#gameStatus{
    text-align:center;
    padding:20px;
    font-size:1.1rem;
    color:var(--gold-light);
}

/* Scrollbar */

::-webkit-scrollbar{
    width:8px;
}

::-webkit-scrollbar-track{
    background:#111;
}

::-webkit-scrollbar-thumb{
    background:var(--gold);
    border-radius:20px;
}

/* Responsive */

@media(max-width:768px){

    header h1{
        font-size:2.1rem;
    }

    #timer{
        font-size:3rem;
    }

    .role-card{
        width:100%;
    }

    .chat-input{
        flex-direction:column;
    }

    .chat-input button{
        width:100%;
    }

    .voice-buttons{
        flex-direction:column;
    }
}