/* ================================================
   DE VERRADERS ONLINE - COMPLETE STYLESHEET
   ================================================ */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --bg-dark: #0a0a0f;
    --bg-panel: #12121a;
    --bg-card: #1a1a2e;
    --bg-hover: #252540;
    --gold: #daa520;
    --gold-light: #f4d03f;
    --gold-dark: #b8860b;
    --red: #c0392b;
    --red-dark: #8b0000;
    --red-glow: #ff3333;
    --blue: #2e86de;
    --blue-light: #54a0ff;
    --blue-glow: #4da6ff;
    --green: #27ae60;
    --green-light: #2ecc71;
    --purple: #8e44ad;
    --text: #e8e6e3;
    --text-dim: #8a8a9a;
    --text-gold: #f0c040;
    --border: #2a2a3e;
    --shadow: rgba(0,0,0,0.5);

    /* Spacing */
    --gap-xs: 4px;
    --gap-sm: 8px;
    --gap-md: 16px;
    --gap-lg: 24px;
    --gap-xl: 40px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-round: 50%;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

h1, h2, h3, h4, h5 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

/* === PARTICLES CANVAS === */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === SCREENS === */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 1;
}

.screen.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

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

.screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(10,10,20,0.85) 0%, rgba(5,5,10,0.95) 100%);
    z-index: -1;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
    color: #1a1a1a;
    box-shadow: 0 4px 20px rgba(218,165,32,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(218,165,32,0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--gold);
    border: 1px solid var(--gold-dark);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--gold);
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-dim);
}

.btn-danger {
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    color: white;
    box-shadow: 0 4px 20px rgba(192,57,43,0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(192,57,43,0.5);
}

.btn-wide { width: 100%; }

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: btnGlow 3s ease-in-out infinite;
}

@keyframes btnGlow {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.btn-icon { font-size: 1.2em; }

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.back-btn {
    position: absolute;
    top: var(--gap-lg);
    left: var(--gap-lg);
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    z-index: 10;
    transition: color 0.3s;
}

.back-btn:hover { color: var(--gold); }

/* === LANDING PAGE === */
#screen-landing {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    overflow: hidden;
}

.landing-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.castle-silhouette {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 60%;
    background:
        /* Center tower */
        linear-gradient(to top, #0f0f1a 0%, transparent 80%) no-repeat center bottom / 8% 55%,
        /* Left tower */
        linear-gradient(to top, #0f0f1a 0%, transparent 80%) no-repeat 30% bottom / 6% 45%,
        /* Right tower */
        linear-gradient(to top, #0f0f1a 0%, transparent 80%) no-repeat 70% bottom / 6% 45%,
        /* Base wall */
        linear-gradient(to top, #0f0f1a 0%, #0f0f1a 60%, transparent 100%) no-repeat center bottom / 60% 30%,
        /* Far left turret */
        linear-gradient(to top, #0a0a12 0%, transparent 80%) no-repeat 15% bottom / 4% 35%,
        /* Far right turret */
        linear-gradient(to top, #0a0a12 0%, transparent 80%) no-repeat 85% bottom / 4% 35%;
    opacity: 0.6;
}

.fog {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 200px;
    background: linear-gradient(to top, rgba(20,20,30,0.8), transparent);
    animation: fogDrift 20s linear infinite;
}

.fog-1 { animation-duration: 25s; opacity: 0.6; bottom: 0; }
.fog-2 { animation-duration: 18s; opacity: 0.4; bottom: 40px; animation-delay: -5s; }
.fog-3 { animation-duration: 30s; opacity: 0.3; bottom: 80px; animation-delay: -10s; }

@keyframes fogDrift {
    0% { transform: translateX(0); }
    50% { transform: translateX(-25%); }
    100% { transform: translateX(0); }
}

.landing-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--gap-lg);
}

.logo-container {
    margin-bottom: var(--gap-xl);
}

.logo-emblem {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--gap-lg);
    animation: emblemFloat 4s ease-in-out infinite;
}

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

.emblem-svg { width: 100%; height: 100%; }

.emblem-dagger {
    animation: daggerGlow 2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes daggerGlow {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(218,165,32,0.5)); }
    50% { filter: drop-shadow(0 0 10px rgba(218,165,32,0.8)); }
}

.game-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: var(--gap-md);
}

.title-de {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--text-dim);
    letter-spacing: 8px;
    text-transform: uppercase;
}

.title-main {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 2px 8px rgba(218,165,32,0.3));
    line-height: 1.1;
}

.title-online {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.tagline {
    font-size: 1.05rem;
    color: var(--text-dim);
    font-style: italic;
    margin-top: var(--gap-sm);
}

.landing-actions {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
    align-items: center;
    margin-bottom: var(--gap-xl);
}

.landing-stats {
    display: flex;
    gap: var(--gap-lg);
    align-items: center;
    justify-content: center;
    padding: var(--gap-md) var(--gap-lg);
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.05);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border);
}

/* === PANELS === */
.panel {
    position: relative;
    margin: auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--gap-xl);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) var(--bg-dark);
}

.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-track { background: var(--bg-dark); }
.panel::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

.panel-center {
    width: 90%;
    max-width: 500px;
}

.panel-large {
    width: 95%;
    max-width: 1000px;
}

.panel-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: var(--gap-sm);
    margin-top: var(--gap-md);
}

.panel-subtitle {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: var(--gap-lg);
}

/* === NAME INPUT === */
.name-input-group {
    margin-bottom: var(--gap-lg);
}

.name-input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: var(--gap-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.name-input-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.name-input-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(218,165,32,0.1);
}

/* === AVATAR GRID === */
.avatar-quick-select {
    margin-bottom: var(--gap-lg);
}

.avatar-quick-select label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: var(--gap-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--gap-sm);
}

.avatar-option {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: var(--bg-dark);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--gap-xs);
    position: relative;
    overflow: hidden;
}

.avatar-option:hover {
    border-color: var(--gold-dark);
    transform: scale(1.05);
}

.avatar-option.selected {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(218,165,32,0.3);
    background: rgba(218,165,32,0.05);
}

.avatar-option .avatar-emoji {
    font-size: 2rem;
    line-height: 1;
}

.avatar-option .avatar-name {
    font-size: 0.55rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* === HOW TO PLAY === */
.howto-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap-lg);
    margin-bottom: var(--gap-xl);
}

.howto-step {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--gap-lg);
    position: relative;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.howto-step:hover {
    border-color: var(--gold-dark);
    transform: translateY(-2px);
}

.step-number {
    position: absolute;
    top: -12px;
    left: var(--gap-md);
    width: 28px;
    height: 28px;
    background: var(--gold);
    color: var(--bg-dark);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'Cinzel', serif;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: var(--gap-sm);
}

.howto-step h3 {
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: var(--gap-sm);
}

.howto-step p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Roles grid */
.howto-roles, .howto-items {
    margin-bottom: var(--gap-xl);
}

.howto-roles h3, .howto-items h3 {
    text-align: center;
    color: var(--gold);
    margin-bottom: var(--gap-lg);
    font-size: 1.3rem;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--gap-md);
}

.role-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--gap-lg);
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.role-card:hover {
    transform: translateY(-3px);
}

.role-faithful { border-color: rgba(46,134,222,0.3); }
.role-faithful:hover { border-color: var(--blue); box-shadow: 0 4px 20px rgba(46,134,222,0.2); }
.role-traitor { border-color: rgba(192,57,43,0.3); }
.role-traitor:hover { border-color: var(--red); box-shadow: 0 4px 20px rgba(192,57,43,0.2); }
.role-seer { border-color: rgba(142,68,173,0.3); }
.role-seer:hover { border-color: var(--purple); box-shadow: 0 4px 20px rgba(142,68,173,0.2); }
.role-guard { border-color: rgba(39,174,96,0.3); }
.role-guard:hover { border-color: var(--green); box-shadow: 0 4px 20px rgba(39,174,96,0.2); }

.role-icon {
    font-size: 2.5rem;
    margin-bottom: var(--gap-sm);
}

.role-card h4 {
    color: var(--text);
    margin-bottom: var(--gap-sm);
    font-size: 1.1rem;
}

.role-card p {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Items grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--gap-md);
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--gap-md);
    text-align: center;
    transition: all 0.3s;
}

.item-card:hover {
    border-color: var(--gold-dark);
    transform: translateY(-2px);
}

.item-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--gap-sm);
}

.item-card strong {
    display: block;
    color: var(--gold);
    margin-bottom: var(--gap-xs);
}

.item-card p {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* === CHARACTERS SHOWCASE === */
.characters-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--gap-md);
}

.character-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--gap-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.character-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(218,165,32,0.15);
}

.character-avatar {
    font-size: 3rem;
    margin-bottom: var(--gap-sm);
    display: block;
}

.character-name {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--gap-xs);
}

.character-type {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--gap-sm);
}

.character-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* === LOBBY === */
.lobby-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: var(--gap-lg);
    background: var(--bg-dark);
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--gap-md);
    border-bottom: 1px solid var(--border);
}

.lobby-header h2 {
    color: var(--gold);
    font-size: 1.3rem;
}

.lobby-info {
    display: flex;
    gap: var(--gap-md);
    align-items: center;
}

.lobby-code {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 0.9rem;
    background: var(--bg-card);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-dark);
    letter-spacing: 2px;
}

.lobby-mode {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.lobby-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--gap-lg);
    padding: var(--gap-lg) 0;
    overflow: hidden;
}

.lobby-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--gap-md);
    align-content: start;
    overflow-y: auto;
    padding: var(--gap-sm);
}

.lobby-player {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--gap-md);
    text-align: center;
    animation: playerJoin 0.5s ease;
}

.lobby-player.is-you {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(218,165,32,0.15);
}

.lobby-player-empty {
    background: var(--bg-dark);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: var(--gap-md);
    text-align: center;
    opacity: 0.4;
}

@keyframes playerJoin {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lobby-player .player-avatar {
    font-size: 2.5rem;
    margin-bottom: var(--gap-xs);
}

.lobby-player .player-name {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
}

.lobby-player .player-tag {
    font-size: 0.7rem;
    color: var(--gold);
    margin-top: 2px;
}

.lobby-player-empty .player-avatar {
    font-size: 2.5rem;
    margin-bottom: var(--gap-xs);
    opacity: 0.3;
}

/* Lobby Sidebar */
.lobby-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
    overflow: hidden;
}

.lobby-settings {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--gap-md);
}

.lobby-settings h3 {
    color: var(--gold);
    font-size: 0.95rem;
    margin-bottom: var(--gap-md);
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--gap-sm) 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.setting-row:last-child { border-bottom: none; }

.setting-row label {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

.setting-control button {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--gold);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.setting-control button:hover {
    background: var(--bg-hover);
    border-color: var(--gold);
}

.setting-control span {
    color: var(--gold);
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* Toggle */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input { display: none; }

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle input:checked + .toggle-slider {
    background: var(--gold-dark);
    border-color: var(--gold);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--gold);
}

/* Lobby Chat */
.lobby-chat {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: var(--gap-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-msg {
    font-size: 0.85rem;
    line-height: 1.4;
    animation: chatIn 0.3s ease;
}

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

.chat-msg .chat-author {
    font-weight: 600;
    color: var(--gold);
}

.chat-msg .chat-text {
    color: var(--text);
}

.chat-system {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    padding: var(--gap-xs) 0;
}

.chat-emote {
    text-align: center;
    font-size: 1.5rem;
    animation: emoteIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes emoteIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.chat-input-row {
    display: flex;
    border-top: 1px solid var(--border);
}

.chat-input-row input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-dark);
    border: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    outline: none;
}

.chat-input-row button {
    padding: 10px 16px;
    background: var(--gold-dark);
    border: none;
    color: var(--bg-dark);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.chat-input-row button:hover {
    background: var(--gold);
}

/* Lobby Footer */
.lobby-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--gap-md);
    border-top: 1px solid var(--border);
}

.lobby-player-count {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.lobby-player-count span {
    color: var(--gold);
    font-weight: 600;
}

/* === ROLE REVEAL === */
#screen-role {
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}

.role-reveal-container {
    text-align: center;
}

.role-reveal-card {
    width: 280px;
    height: 400px;
    perspective: 1000px;
    margin: 0 auto var(--gap-lg);
    cursor: pointer;
}

.role-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-card-inner.flipped {
    transform: rotateY(180deg);
}

.role-card-back, .role-card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--gap-lg);
}

.role-card-back {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid var(--gold);
    box-shadow: 0 0 40px rgba(218,165,32,0.2);
    animation: cardPulse 2s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(218,165,32,0.2); }
    50% { box-shadow: 0 0 40px rgba(218,165,32,0.4); }
}

.card-seal svg {
    width: 80px;
    height: 80px;
    margin-bottom: var(--gap-lg);
}

.role-card-back p {
    color: var(--text-dim);
    font-style: italic;
    font-size: 0.9rem;
}

.role-card-front {
    transform: rotateY(180deg);
    border: 2px solid;
    text-align: center;
}

.role-card-front.faithful-card {
    background: linear-gradient(135deg, #0d1b3e, #1a365d);
    border-color: var(--blue);
    box-shadow: 0 0 30px rgba(46,134,222,0.3);
}

.role-card-front.traitor-card {
    background: linear-gradient(135deg, #2d0a0a, #4a1111);
    border-color: var(--red);
    box-shadow: 0 0 30px rgba(192,57,43,0.3);
}

.role-card-front .role-reveal-icon {
    font-size: 4rem;
    margin-bottom: var(--gap-md);
}

.role-card-front .role-reveal-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.6rem;
    margin-bottom: var(--gap-sm);
}

.role-card-front .role-reveal-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.faithful-card .role-reveal-title { color: var(--blue-light); }
.traitor-card .role-reveal-title { color: var(--red-glow); }

/* === GAME HUD === */
.game-hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--gap-sm) var(--gap-lg);
    background: linear-gradient(to bottom, rgba(10,10,15,0.95), rgba(10,10,15,0.7));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.hud-left, .hud-right {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
}

.hud-phase {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--gold);
    padding: 4px 12px;
    background: rgba(218,165,32,0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(218,165,32,0.2);
}

.hud-round {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.hud-round span { color: var(--text); font-weight: 600; }

/* Timer */
.hud-timer {
    position: relative;
    width: 50px;
    height: 50px;
}

.timer-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 2;
}

.timer-fill {
    fill: none;
    stroke: var(--gold);
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-fill.warning { stroke: var(--red); }

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.hud-zilver {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.zilver-icon {
    color: var(--gold);
    margin-right: 2px;
}

.hud-zilver span { color: var(--gold); font-weight: 600; }

.hud-alive {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.hud-alive span { color: var(--text); font-weight: 600; }

/* === GAME PHASES === */
.game-phases {
    height: 100vh;
    padding-top: 60px;
}

.game-phase {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.phase-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--gold);
    text-align: center;
    margin-bottom: var(--gap-md);
}

.phase-subtitle {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: var(--gap-lg);
}

/* Night Phase */
.night-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #050510, #0a0a1a, #0f0f2a);
    z-index: -1;
}

.moon {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f5f5dc, #daa520);
    box-shadow: 0 0 40px rgba(218,165,32,0.3), 0 0 80px rgba(218,165,32,0.1);
    animation: moonGlow 4s ease-in-out infinite;
}

@keyframes moonGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(218,165,32,0.3); }
    50% { box-shadow: 0 0 60px rgba(218,165,32,0.5); }
}

.night-title {
    color: #8899cc;
    text-shadow: 0 0 20px rgba(136,153,204,0.3);
}

.night-content {
    text-align: center;
    padding: var(--gap-lg);
    max-width: 600px;
    width: 100%;
}

/* Traitor Panel */
.traitor-panel {
    background: rgba(139,0,0,0.1);
    border: 1px solid rgba(192,57,43,0.3);
    border-radius: var(--radius-lg);
    padding: var(--gap-lg);
    margin-top: var(--gap-lg);
}

.traitor-panel h3 {
    color: var(--red-glow);
    margin-bottom: var(--gap-sm);
}

.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--gap-sm);
    margin: var(--gap-md) 0;
}

.target-option {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--gap-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.target-option:hover {
    border-color: var(--red);
}

.target-option.selected {
    border-color: var(--red-glow);
    background: rgba(192,57,43,0.15);
    box-shadow: 0 0 15px rgba(192,57,43,0.2);
}

.target-option .target-emoji {
    font-size: 1.8rem;
}

.target-option .target-name {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Traitor Chat */
.traitor-chat {
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    margin: var(--gap-md) 0;
    overflow: hidden;
    max-height: 150px;
}

.traitor-chat .chat-messages {
    min-height: 80px;
    max-height: 100px;
}

.traitor-chat .chat-author {
    color: var(--red-glow) !important;
}

/* Faithful Night */
.faithful-night {
    margin-top: var(--gap-xl);
}

.sleeping-animation {
    display: flex;
    justify-content: center;
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

.zzz {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #8899cc;
    animation: zzz 2s ease-in-out infinite;
    opacity: 0.6;
}

.zzz.delay-1 { animation-delay: 0.5s; font-size: 1.5rem; }
.zzz.delay-2 { animation-delay: 1s; font-size: 2.5rem; }

@keyframes zzz {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-15px); opacity: 0.8; }
}

.night-hint {
    color: var(--text-dim);
    font-style: italic;
    margin-top: var(--gap-md);
    font-size: 0.9rem;
}

/* Morning Phase */
.morning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #1a1510, #2a2015, #1a1510);
    z-index: -1;
}

.morning-title {
    color: #e8c170;
}

.morning-content {
    text-align: center;
    padding: var(--gap-lg);
    width: 100%;
    max-width: 800px;
}

.breakfast-table {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap-md);
    margin: var(--gap-lg) 0;
}

.breakfast-seat {
    width: 70px;
    text-align: center;
    transition: all 0.5s;
}

.breakfast-seat .seat-avatar {
    font-size: 2rem;
    transition: all 0.5s;
}

.breakfast-seat .seat-name {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.breakfast-seat.eliminated {
    opacity: 0.3;
}

.breakfast-seat.eliminated .seat-avatar {
    filter: grayscale(1);
}

.breakfast-seat.victim {
    animation: victimReveal 1s ease;
}

@keyframes victimReveal {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(0.8); opacity: 0.3; }
}

.murder-reveal {
    margin-top: var(--gap-lg);
    padding: var(--gap-lg);
    background: rgba(139,0,0,0.1);
    border: 1px solid rgba(192,57,43,0.3);
    border-radius: var(--radius-lg);
    animation: revealIn 1s ease;
}

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

.murder-victim {
    text-align: center;
}

.murder-victim .victim-avatar {
    font-size: 3rem;
    filter: grayscale(1);
    margin-bottom: var(--gap-sm);
}

.murder-victim .victim-name {
    font-family: 'Cinzel', serif;
    color: var(--red);
    font-size: 1.2rem;
    margin-bottom: var(--gap-xs);
}

.murder-victim .victim-text {
    color: var(--text-dim);
    font-style: italic;
}

/* Roundtable Phase */
.roundtable-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--gap-lg);
    width: 100%;
    height: 100%;
    padding: 70px var(--gap-lg) var(--gap-lg);
}

.roundtable-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-circle {
    position: relative;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
}

.table-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #2a2015 0%, #1a1510 100%);
    border-radius: 50%;
    border: 3px solid var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(218,165,32,0.15);
}

.table-center span {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.table-seat {
    position: absolute;
    width: 70px;
    text-align: center;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s;
}

.table-seat:hover { transform: translate(-50%, -50%) scale(1.1); }

.table-seat .seat-avatar {
    font-size: 2rem;
    display: block;
}

.table-seat .seat-name {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 2px;
    white-space: nowrap;
}

.table-seat.speaking {
    animation: speakingPulse 1s ease-in-out infinite;
}

@keyframes speakingPulse {
    0%, 100% { filter: drop-shadow(0 0 5px var(--gold)); }
    50% { filter: drop-shadow(0 0 15px var(--gold)); }
}

.table-seat .seat-emote {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    animation: emoteFloat 2s ease forwards;
    pointer-events: none;
}

@keyframes emoteFloat {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* Discussion panel */
.discussion-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.discussion-panel h3 {
    color: var(--gold);
    font-size: 0.95rem;
    padding: var(--gap-md);
    border-bottom: 1px solid var(--border);
}

.discussion-panel .chat-messages {
    flex: 1;
}

.emote-bar {
    display: flex;
    gap: 2px;
    padding: var(--gap-xs) var(--gap-sm);
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
}

.emote-btn {
    flex: 1;
    padding: 6px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.emote-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    transform: scale(1.15);
}

/* Voting Phase */
.voting-content {
    text-align: center;
    padding: var(--gap-lg);
    width: 100%;
    max-width: 800px;
}

.vote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--gap-md);
    margin: var(--gap-lg) 0;
}

.vote-option {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--gap-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.vote-option:hover {
    border-color: var(--gold-dark);
    transform: translateY(-2px);
}

.vote-option.selected {
    border-color: var(--red);
    background: rgba(192,57,43,0.1);
    box-shadow: 0 0 20px rgba(192,57,43,0.2);
}

.vote-option .vote-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--gap-sm);
}

.vote-option .vote-name {
    font-size: 0.85rem;
    color: var(--text);
}

.vote-option .vote-count {
    font-size: 0.75rem;
    color: var(--red);
    margin-top: var(--gap-xs);
    font-weight: 600;
}

.vote-actions {
    display: flex;
    gap: var(--gap-md);
    justify-content: center;
    margin-top: var(--gap-md);
}

.vote-tally {
    margin-top: var(--gap-lg);
    padding: var(--gap-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.vote-tally-bar {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-sm);
    animation: tallyIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes tallyIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.vote-tally-name {
    width: 100px;
    text-align: right;
    font-size: 0.85rem;
}

.vote-tally-fill {
    flex: 1;
    height: 24px;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.vote-tally-fill-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    border-radius: var(--radius-sm);
    transition: width 1s ease;
    min-width: 0;
}

.vote-tally-count {
    width: 30px;
    text-align: center;
    font-weight: 700;
    color: var(--red);
}

/* Banishment Phase */
.banishment-content {
    text-align: center;
    padding: var(--gap-lg);
}

.banishment-dramatic {
    animation: banishIn 1s ease;
}

@keyframes banishIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.banish-card {
    display: inline-block;
    padding: var(--gap-xl);
    border-radius: var(--radius-lg);
    margin: var(--gap-lg) 0;
}

.banish-card.is-traitor {
    background: rgba(192,57,43,0.1);
    border: 2px solid var(--red);
    box-shadow: 0 0 40px rgba(192,57,43,0.3);
}

.banish-card.is-faithful {
    background: rgba(46,134,222,0.1);
    border: 2px solid var(--blue);
    box-shadow: 0 0 40px rgba(46,134,222,0.3);
}

.banish-avatar {
    font-size: 4rem;
    margin-bottom: var(--gap-md);
}

.banish-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: var(--gap-sm);
}

.banish-role {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2rem;
    margin-bottom: var(--gap-sm);
}

.is-traitor .banish-name { color: var(--red-glow); }
.is-traitor .banish-role { color: var(--red); }
.is-faithful .banish-name { color: var(--blue-glow); }
.is-faithful .banish-role { color: var(--blue); }

.banish-text {
    color: var(--text-dim);
    font-style: italic;
}

/* === MISSION: MEMORY GAME === */
.mission-score-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--gap-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: var(--gap-lg);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.mission-progress { color: var(--text-dim); }
.mission-progress strong { color: var(--gold); }
.mission-timer { color: var(--gold); font-weight: 600; }

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 80px);
    gap: var(--gap-sm);
    justify-content: center;
    margin: 0 auto;
}

.memory-card {
    width: 80px;
    height: 80px;
    perspective: 600px;
    cursor: pointer;
}

.memory-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.memory-card.flipped .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card.matched .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card.matched {
    opacity: 0.5;
    pointer-events: none;
}

.memory-card-front, .memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.memory-card-back {
    background: var(--bg-card);
    border: 2px solid var(--gold-dark);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
}

.memory-card-front {
    background: var(--bg-hover);
    border: 2px solid var(--border);
    transform: rotateY(180deg);
}

/* === MISSION: TOWER CLIMB === */
.tower-game {
    text-align: center;
}

.tower-visual {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--gap-md);
    height: 300px;
    margin-bottom: var(--gap-lg);
}

.tower-structure {
    width: 60px;
    height: 100%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    overflow: hidden;
}

.tower-progress-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, var(--gold-dark), var(--gold));
    transition: height 0.2s ease;
}

.tower-climber {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    transition: bottom 0.2s ease;
    z-index: 2;
}

.tower-height {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.2rem;
}

.btn-tower-click {
    font-size: 1.5rem;
    padding: 20px 60px;
    animation: towerBtnPulse 1s ease-in-out infinite;
}

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

.tower-leaderboard {
    margin-top: var(--gap-lg);
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.tower-lb-entry {
    display: flex;
    justify-content: space-between;
    padding: var(--gap-xs) var(--gap-sm);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.tower-lb-entry .lb-name { color: var(--text); }
.tower-lb-entry .lb-score { color: var(--gold); font-weight: 600; }

/* === GAME OVER === */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease;
}

.game-over-content {
    text-align: center;
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--gap-xl);
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.game-over-result h2 {
    font-size: 2rem;
    margin-bottom: var(--gap-sm);
}

.game-over-result.faithful-win h2 { color: var(--blue-light); }
.game-over-result.traitor-win h2 { color: var(--red-glow); }

.game-over-result .result-icon {
    font-size: 4rem;
    margin-bottom: var(--gap-md);
}

.game-over-result .result-text {
    color: var(--text-dim);
    margin-bottom: var(--gap-lg);
}

.game-over-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

.go-stat {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--gap-md);
}

.go-stat .go-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--gold);
}

.go-stat .go-stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.game-over-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--gap-sm);
    margin-bottom: var(--gap-lg);
}

.go-player {
    padding: var(--gap-sm);
    border-radius: var(--radius-md);
    text-align: center;
}

.go-player.was-traitor {
    background: rgba(192,57,43,0.1);
    border: 1px solid rgba(192,57,43,0.3);
}

.go-player.was-faithful {
    background: rgba(46,134,222,0.1);
    border: 1px solid rgba(46,134,222,0.3);
}

.go-player .go-avatar { font-size: 1.5rem; }
.go-player .go-name { font-size: 0.75rem; color: var(--text); margin-top: 2px; }
.go-player .go-role { font-size: 0.65rem; font-weight: 600; margin-top: 1px; }
.go-player.was-traitor .go-role { color: var(--red); }
.go-player.was-faithful .go-role { color: var(--blue); }

.game-over-actions {
    display: flex;
    gap: var(--gap-md);
    justify-content: center;
}

/* === TOASTS === */
.toast-container {
    position: fixed;
    top: 80px;
    right: var(--gap-lg);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.toast {
    padding: var(--gap-md) var(--gap-lg);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.9rem;
    box-shadow: 0 8px 30px var(--shadow);
    animation: toastIn 0.4s ease, toastOut 0.4s ease 3s forwards;
    max-width: 350px;
}

.toast.toast-danger { border-color: var(--red); }
.toast.toast-success { border-color: var(--green); }
.toast.toast-info { border-color: var(--blue); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(50px); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .lobby-main {
        grid-template-columns: 1fr;
    }

    .lobby-sidebar {
        max-height: 300px;
    }

    .roundtable-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 300px;
    }

    .table-circle {
        width: min(350px, 90vw);
        height: min(350px, 90vw);
    }

    .landing-stats {
        flex-direction: column;
        gap: var(--gap-sm);
    }

    .stat-divider {
        width: 30px;
        height: 1px;
    }

    .memory-grid {
        grid-template-columns: repeat(4, 65px);
    }

    .memory-card {
        width: 65px;
        height: 65px;
    }

    .game-over-stats {
        grid-template-columns: 1fr;
    }

    .characters-showcase {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .avatar-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .panel {
        padding: var(--gap-lg);
    }

    .avatar-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
