:root {
    --primary: #c1121f;
    --primary-dark: #780000;
    --secondary: #003049;
    --accent: #fdf0d5;
    --gold: #e0a96d;
    --gold-bright: #ffc300;
    --bg: #0b0f19;
    --surface: #141b2d;
    --surface-light: #1f293d;
    --surface-border: #2c3852;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef233c;
    --success: #2ec4b6;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    user-select: none;
}

/* Background Congreso Aesthetic */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 15%, rgba(120, 0, 0, 0.25) 0%, rgba(11, 15, 25, 0.95) 70%),
                linear-gradient(180deg, rgba(0, 48, 73, 0.3) 0%, rgba(11, 15, 25, 1) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Top App Header (Only in Lobby) */
.app-header {
    background: rgba(20, 27, 45, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 22px;
}

.brand-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--gold-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.btn-icon:active {
    transform: scale(0.92);
}

/* Main Container */
.container {
    flex: 1;
    width: 100%;
    max-width: min(1440px, 98vw);
    margin: 0 auto;
    padding: 10px 14px 70px;
    display: flex;
    flex-direction: column;
}

/* Screen Transitions */
.screen {
    display: none;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.25s ease-out;
    width: 100%;
}

.screen.active {
    display: flex;
}

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

/* Lobby Screen */
#screen-lobby .lobby-card {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.lobby-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.game-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    background: radial-gradient(circle, #780000 0%, #141b2d 80%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(224, 169, 109, 0.3);
}

.lobby-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.lobby-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    margin-bottom: 14px;
}

.input-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.input-text {
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

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

.btn-primary {
    background: linear-gradient(135deg, #c1121f 0%, #780000 100%);
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(193, 18, 31, 0.35);
    transition: transform 0.15s, opacity 0.15s;
    width: 100%;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--surface-border);
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    margin-top: 6px;
}

.btn-secondary:active {
    background: var(--surface-border);
}

/* Room Info & QR */
.room-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(224, 169, 109, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold-bright);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 10px 0;
}

.qr-box {
    margin: 10px auto;
    padding: 10px;
    background: #fff;
    border-radius: 14px;
    display: inline-block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.qr-box canvas {
    display: block;
}

/* Player List */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.player-item {
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.player-name {
    font-size: 15px;
    font-weight: 600;
}

.player-role-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-host {
    background: rgba(255, 195, 0, 0.2);
    color: var(--gold-bright);
    border: 1px solid rgba(255, 195, 0, 0.4);
}

.badge-president {
    background: rgba(193, 18, 31, 0.25);
    color: #ff6b6b;
    border: 1px solid var(--primary);
}

.badge-partner {
    background: rgba(46, 196, 182, 0.25);
    color: #2ec4b6;
    border: 1px solid var(--success);
}

/* ============================================================= */
/* BARRA SUPERIOR DEL CONGRESO (TOP BAR EN PARTIDA)             */
/* ============================================================= */

.game-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 14px;
    background: rgba(18, 24, 38, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.game-top-left, .game-top-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-top-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.game-top-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.game-top-pill strong {
    color: var(--gold-bright);
    letter-spacing: 1px;
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    box-shadow: 0 0 6px var(--success);
}

/* BOTÓN DE PARTIDOS EN JUEGO */
.btn-partidos-banner {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.22), rgba(212, 160, 23, 0.08));
    border: 1px solid var(--gold);
    color: var(--gold-bright);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 2px 10px rgba(212, 160, 23, 0.15);
}

.btn-partidos-banner:hover {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.35), rgba(212, 160, 23, 0.15));
    border-color: #ffd166;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 160, 23, 0.3);
}

.btn-partidos-banner:active {
    transform: translateY(1px);
}

.btn-partidos-icon {
    font-size: 15px;
}

.btn-partidos-label {
    letter-spacing: 0.3px;
}

.btn-partidos-badge {
    background: var(--gold);
    color: #111111;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.btn-top-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s, border-color 0.15s;
}

.btn-top-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold);
}

/* GRID DE PARTIDOS EN JUEGO EN EL MODAL */
.modal-box-large {
    max-width: 680px;
    width: 95%;
}

.parties-in-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.party-roster-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}

.party-roster-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--party-color, var(--gold));
}

.party-roster-card:hover {
    transform: translateY(-2px);
    border-color: var(--party-color, var(--gold));
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.party-roster-thumb {
    width: 44px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.party-roster-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.party-roster-name {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.party-roster-bloc {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.party-roster-lema {
    font-size: 11px;
    color: var(--gold-bright);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.party-roster-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(212, 160, 23, 0.12);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 4px 10px;
    flex-shrink: 0;
}

.party-roster-count-num {
    font-size: 16px;
    font-weight: 900;
    color: var(--gold-bright);
    line-height: 1;
}

.party-roster-count-label {
    font-size: 9.5px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* ============================================================= */
/* GAME HUD LAYOUT: LEFT (PUNTOS), CENTER (STAGE), RIGHT (CARTA) */
/* ============================================================= */

.game-hud-layout {
    display: grid;
    grid-template-columns: 175px 1fr 185px;
    gap: 12px;
    align-items: start;
    width: 100%;
}

/* LADO IZQUIERDO: PUNTOS ACTUALES */
.game-hud-left {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 12px;
}

.hud-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--surface-border);
}

.hud-icon {
    font-size: 16px;
}

.hud-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    flex: 1;
    margin-left: 6px;
}

.btn-sound-mini {
    background: transparent;
    border: none;
    font-size: 15px;
    cursor: pointer;
    color: var(--text-muted);
}

.hud-scores-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.score-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 10px;
    background: var(--surface-light);
    border-left: 4px solid var(--surface-border);
    font-size: 11.5px;
    font-weight: 700;
}

.score-chip-name {
    display: flex;
    align-items: center;
    gap: 5px;
}

.score-chip-pts {
    font-weight: 900;
    font-size: 12.5px;
}

/* LADO DERECHO: MI CARTA BOCABAJO (3D FLIP) */
.game-hud-right {
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 185px;
}

.secret-card-container {
    perspective: 1000px;
    cursor: pointer;
    user-select: none;
    width: 180px;
    height: 268px;
    position: relative;
    transition: transform 0.2s;
}

.secret-card-container:active {
    transform: scale(0.97);
}

.secret-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    border-radius: 16px;
}

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

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 2px solid var(--gold);
    display: flex;
    flex-direction: column;
}

/* Reverso de la carta (bocabajo) */
.card-back {
    background: radial-gradient(circle at 50% 30%, #3a0007 0%, #10141f 90%);
    border-color: var(--gold);
    justify-content: center;
    align-items: center;
    padding: 8px;
}

.card-back-ornament {
    border: 2px dashed rgba(224, 169, 109, 0.45);
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.back-crest {
    font-size: 44px;
    filter: drop-shadow(0 2px 8px rgba(255, 195, 0, 0.5));
}

.back-text {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--gold-bright);
}

.back-sub {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    padding: 3px 10px;
    border-radius: 8px;
    letter-spacing: 0.8px;
}

.back-tap-badge {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    background: rgba(0,0,0,0.4);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Anverso de la carta (revelada) */
.card-front {
    transform: rotateY(180deg);
    background: #000;
    border-color: var(--gold-bright);
    position: relative;
}

.card-front-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-front-img:not([src]),
.card-front-img[src=""] {
    visibility: hidden;
}

.card-front-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 25, 0.92);
    backdrop-filter: blur(6px);
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.front-party-badge {
    font-size: 13px;
    font-weight: 800;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.front-tap-hint {
    font-size: 8px;
    color: var(--text-muted);
}

.hud-secret-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 3px;
    gap: 4px;
}

.btn-flip-hud {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.btn-flip-hud:hover {
    background: rgba(239, 35, 60, 0.85);
    color: #ffffff;
    border-color: #ffffff;
}

/* CENTRO: ACCIÓN Y PARLAMENTO */
.game-hud-center {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* Parliamentary Status Board */
.parliament-status {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.status-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Inestabilidad Track */
.instability-container {
    grid-column: span 2;
    padding-top: 6px;
    border-top: 1px solid var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.instability-track {
    display: flex;
    gap: 8px;
}

.instability-node {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface-light);
    border: 2px solid var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    transition: all 0.3s;
}

.instability-node.active-1 {
    background: #ffb703;
    border-color: #ffb703;
    color: #000;
    box-shadow: 0 0 8px rgba(255, 183, 3, 0.4);
}

.instability-node.active-2 {
    background: #fb8500;
    border-color: #fb8500;
    color: #000;
    box-shadow: 0 0 8px rgba(251, 133, 0, 0.5);
}

.instability-node.active-3 {
    background: #f77f00;
    border-color: #f77f00;
    color: #fff;
    box-shadow: 0 0 10px rgba(247, 127, 0, 0.6);
}

.instability-node.active-4 {
    background: #e63946;
    border-color: #e63946;
    color: #fff;
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.7);
}

.instability-node.active-5 {
    background: #d90429;
    border-color: #ff0055;
    color: #fff;
    box-shadow: 0 0 14px rgba(217, 4, 41, 0.85);
    animation: pulseAlarm 0.9s infinite alternate;
}

.instability-node.active-6 {
    background: #000;
    border-color: #ff0000;
    color: #ff2a2a;
    box-shadow: 0 0 18px rgba(255, 0, 0, 1);
    animation: pulseAlarm 0.4s infinite alternate;
}

@keyframes pulseAlarm {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

/* Active Coalition Panel */
.coalition-box {
    background: linear-gradient(135deg, rgba(20, 27, 45, 0.9) 0%, rgba(31, 41, 61, 0.9) 100%);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.coalition-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--gold-bright), var(--success));
}

.coalition-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.coalition-leaders {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.leader-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.leader-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-light);
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
}

.leader-role {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.leader-name {
    font-size: 13px;
    font-weight: 700;
}

.coalition-plus {
    font-size: 20px;
    font-weight: 900;
    color: var(--gold-bright);
}

/* Voting Buttons */
.voting-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.btn-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 10px;
    border-radius: 16px;
    border: none;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s, opacity 0.15s;
}

.btn-vote:active {
    transform: scale(0.95);
}

.btn-vote-yes {
    background: linear-gradient(135deg, #2ec4b6 0%, #0096c7 100%);
    color: #fff;
}

.btn-vote-no {
    background: linear-gradient(135deg, #ef233c 0%, #d90429 100%);
    color: #fff;
}

.vote-icon {
    font-size: 30px;
}

/* ============================================================= */
/* PHASE: COUNCIL OF MINISTERS (CONSEJO DE MINISTROS)            */
/* ============================================================= */

.phase-council .coalition-box {
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(16, 22, 38, 0.85);
    border-color: rgba(224, 169, 109, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.phase-council .coalition-title {
    font-size: 11px;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.phase-council .coalition-leaders {
    gap: 8px;
}

.phase-council .leader-badge {
    flex-direction: row;
    padding: 3px 10px;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.phase-council .leader-avatar {
    width: 24px;
    height: 24px;
    font-size: 13px;
}

.phase-council .leader-role {
    display: none;
}

.phase-council .leader-name {
    font-size: 12.5px;
    font-weight: 800;
}

.phase-council .coalition-plus {
    font-size: 14px;
    opacity: 0.7;
}

.phase-council .parliament-status {
    padding: 6px 12px;
}

.phase-council .hemiciclo-section {
    display: none;
}

.phase-council .council-box {
    padding: 10px 12px 8px;
    background: rgba(16, 22, 38, 0.96);
    border: 1px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(224, 169, 109, 0.12);
}

.council-header-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(224, 169, 109, 0.2);
}

.council-header-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--gold-bright);
}

.council-header-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================= */
/* COUNCIL FULLSCREEN SWIPE DECK (TINDER-STYLE LAW SELECTION)   */
/* ============================================================= */

.council-fullscreen-deck {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    overflow: visible;
}

.carousel-nav-bar {
    display: none; /* Oculto en escritorio */
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 325px;
    margin: 0 auto 10px;
    padding: 6px 14px;
    background: rgba(15, 21, 35, 0.94);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.carousel-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--gold-bright);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, opacity 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.carousel-nav-btn:active {
    transform: scale(0.9);
    background: var(--gold-glow);
}

.carousel-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.carousel-status-text {
    font-size: 13px;
    font-weight: 800;
    color: var(--gold-bright);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.carousel-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.carousel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}

.carousel-dot.active {
    background: var(--gold-bright);
    transform: scale(1.35);
    box-shadow: 0 0 10px rgba(255, 195, 0, 0.75);
}

/* Arena de cartas (Escenario de visualización) */
.council-card-arena {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 920px;
    margin: 0 auto;
    justify-content: center;
    align-items: stretch;
    padding: 4px 0 6px;
    position: relative;
}

.council-card-arena.two-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 630px;
}

.council-deck-action-bar {
    display: none; /* Oculto en escritorio */
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 325px;
    margin: 10px auto 4px;
}

.gesture-vertical-guide {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.2px;
    text-align: center;
}

/* ============================================================= */
/* HORIZONTAL LAW CARDS (PRESENTADAS ENTERAS Y 100% VISIBLES)    */
/* ============================================================= */

.laws-horizontal-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    justify-content: center;
    align-items: stretch;
    padding: 4px 0 6px;
}

.laws-horizontal-container.two-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 630px;
    margin: 0 auto;
}

.law-card-horizontal {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background: #0f1523;
    border: 2px solid var(--surface-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.law-card-horizontal:hover {
    transform: translateY(-4px);
    border-color: var(--gold-bright);
    box-shadow: 0 12px 28px rgba(255, 195, 0, 0.35);
}

.law-card-full-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1696 / 2528;
    background: #060911;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    container-type: inline-size;
    overflow: hidden;
    line-height: 0;
}

/* La imagen de la carta se muestra 100% ENTERA, sin recortes ni barras negras */
.law-card-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Indicador de Zoom interactivo en la carta */
.card-zoom-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--gold-bright);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s ease, background 0.15s ease;
}

.law-card-horizontal:hover .card-zoom-badge {
    transform: scale(1.08);
    background: rgba(10, 14, 26, 0.95);
    border-color: var(--gold-bright);
}

/* Capa dinámica superpuesta programáticamente sobre el pergamino limpio */
.law-card-dynamic-overlay {
    position: absolute;
    bottom: 11.5%;
    left: 7.2%;
    right: 7.2%;
    height: 16.0%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1510;
    line-height: 1;
    z-index: 2;
    overflow: hidden;
}

.law-overlay-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    height: 100%;
    padding: 0 clamp(4px, 1.8cqw, 14px);
    column-gap: clamp(8px, 3.0cqw, 20px);
    row-gap: clamp(3px, 1.4cqw, 8px);
    align-items: center;
}

.law-overlay-item {
    display: inline-flex;
    align-items: center;
    gap: clamp(3px, 1.3cqw, 7px);
    font-size: clamp(10.5px, 5.0cqw, 20px);
    font-weight: 800;
    color: #1a1510;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    justify-self: start;
    line-height: 1.1;
}

.law-overlay-dot {
    width: clamp(7px, 3.4cqw, 14px);
    height: clamp(7px, 3.4cqw, 14px);
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.law-overlay-party {
    color: #181410;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.law-overlay-pts {
    font-size: 1.25em;
    font-weight: 900;
    margin-left: clamp(3px, 1.2cqw, 6px);
    letter-spacing: -0.2px;
}

.law-overlay-pts.pos {
    color: #087f23; /* Verde vibrante y muy destacado */
    text-shadow: 0 0.5px 1px rgba(8, 127, 35, 0.2);
}

.law-overlay-pts.neg {
    color: #cb1b2c; /* Rojo vibrante y muy destacado */
    text-shadow: 0 0.5px 1px rgba(203, 27, 44, 0.2);
}

.btn-law-action {
    margin: 6px 6px 8px;
    padding: 9px 8px;
    border-radius: 10px;
    font-size: clamp(11.5px, 1.05vw, 13.5px);
    font-weight: 800;
    cursor: pointer;
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

/* Botón DESCARTAR LEY en ROJO institucional vibrante */
.btn-law-action.btn-discard {
    background: linear-gradient(135deg, #ef233c 0%, #b7094c 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(239, 35, 60, 0.45);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-law-action.btn-discard:hover {
    background: linear-gradient(135deg, #ff384f 0%, #d90429 100%);
    box-shadow: 0 6px 20px rgba(239, 35, 60, 0.65);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn-law-action.btn-discard:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(239, 35, 60, 0.4);
}

/* Botón APROBAR LEY en verde-turquesa institucional */
.btn-law-action.btn-approve {
    background: linear-gradient(135deg, #2ec4b6 0%, #0096c7 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(46, 196, 182, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-law-action.btn-approve:hover {
    background: linear-gradient(135deg, #38e2d2 0%, #00b4d8 100%);
    box-shadow: 0 6px 20px rgba(46, 196, 182, 0.6);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn-law-action.btn-approve:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 196, 182, 0.4);
}

/* ============================================================= */
/* RESPONSIVE LAYOUT FOR MOBILE PHONES (< 900px)                 */
/* ============================================================= */

@media (max-width: 900px) {
    .container {
        padding: 6px 8px 70px;
    }

    .game-top-bar {
        padding: 5px 8px;
        margin-bottom: 8px;
        gap: 6px;
    }

    .game-top-pill {
        font-size: 10px;
        padding: 3px 7px;
    }

    .btn-partidos-banner {
        font-size: 11.5px;
        padding: 4px 10px;
        gap: 5px;
    }

    .btn-partidos-icon {
        font-size: 13px;
    }

    .parties-in-game-grid {
        grid-template-columns: 1fr;
    }

    .game-hud-layout {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: 
            "scores card"
            "stage stage";
        gap: 8px;
        align-items: stretch;
    }

    /* En móvil: Barra superior con puntos en lado izquierdo y carta secreta en lado derecho */
    .game-hud-left {
        grid-area: scores;
        width: 100%;
        position: relative;
        top: 0;
        padding: 8px 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hud-scores-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .score-chip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 8px;
        font-size: 11.5px;
        border-radius: 8px;
    }

    .score-chip-pts {
        font-size: 12.5px;
    }

    .game-hud-right {
        grid-area: card;
        position: relative;
        top: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    .secret-card-container {
        width: 130px;
        height: 194px;
    }

    .game-hud-center {
        grid-area: stage;
        width: 100%;
    }

    .carousel-nav-bar {
        display: flex;
    }

    .council-deck-action-bar {
        display: flex;
    }

    /* En móvil, la arena se convierte en el escenario de cartas superpuestas (hand/stack) */
    .council-card-arena,
    .council-card-arena.two-cards {
        display: block;
        position: relative;
        width: 100%;
        max-width: min(290px, 78vw);
        height: min(480px, 58vh);
        aspect-ratio: 1696 / 2528;
        margin: 0 auto;
        overflow: visible;
        padding: 0;
        perspective: 1000px;
    }

    .council-card-arena .law-card-horizontal {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        margin: 0 auto;
        border-radius: 16px;
        border-width: 2.5px;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75);
        touch-action: pan-y;
        cursor: pointer;
        transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.28s ease, filter 0.28s ease, box-shadow 0.28s ease;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        transform-origin: center bottom;
        will-change: transform, opacity;
    }

    .council-card-arena .law-card-horizontal:active {
        cursor: grabbing;
    }

    .council-card-arena .law-card-full-img-wrapper {
        height: 100%;
        width: 100%;
        border-bottom: none;
    }

    .council-card-arena .desktop-card-btn {
        display: none !important;
    }

    .council-deck-action-bar .btn-law-action {
        width: 100%;
        padding: 13px 20px;
        font-size: 15px;
        font-weight: 800;
        border-radius: 14px;
        letter-spacing: 0.4px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
        cursor: pointer;
    }
}

@media (max-width: 500px) {
    .council-card-arena,
    .council-card-arena.two-cards {
        max-width: min(270px, 76vw);
        height: min(450px, 55vh);
    }

    .law-overlay-scores {
        padding: 0 2px;
        column-gap: 3px;
    }

    .law-overlay-item {
        font-size: clamp(9px, 4.3cqw, 14px);
        gap: 2px;
    }

    .council-deck-action-bar .btn-law-action {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: rgba(20, 27, 45, 0.95);
    border: 1px solid var(--gold);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    animation: toastSlide 0.2s ease-out;
}

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

/* Floating Quick Reactions (Abajo a la izquierda) */
.reactions-bar {
    position: fixed !important;
    bottom: 12px !important;
    left: 10px !important;
    right: auto !important;
    transform: none !important;
    background: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

.btn-reaction {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 50%;
    transition: transform 0.15s;
    line-height: 1;
}

.btn-reaction:active {
    transform: scale(1.3);
}

/* Scoreboard Hemiciclo */
.scoreboard-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.score-row {
    background: var(--surface-light);
    border-left: 5px solid var(--surface-border);
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.15s, background 0.15s;
}

.score-row.score-row-winner {
    background: linear-gradient(90deg, rgba(224, 169, 109, 0.18) 0%, rgba(20, 27, 45, 0.8) 100%);
    border-left-width: 6px;
    box-shadow: 0 4px 14px rgba(224, 169, 109, 0.18);
}

/* ============================================================= */
/* PANTALLA FIN DE PARTIDA: GANADOR DESTACADO Y ROLES REVELADOS  */
/* ============================================================= */

.game-over-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 22px 36px;
    text-align: left;
    background: rgba(14, 19, 32, 0.98);
    border: 2px solid var(--surface-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.victory-hero-banner {
    text-align: center;
    padding: 10px 10px 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.victory-hero-badge {
    font-size: 56px;
    margin-bottom: 6px;
    filter: drop-shadow(0 6px 16px rgba(255, 195, 0, 0.45));
    animation: badgePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.victory-hero-title {
    font-size: clamp(22px, 3.2vw, 32px);
    font-weight: 900;
    color: var(--gold-bright);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(224, 169, 109, 0.35);
}

.victory-hero-desc {
    font-size: clamp(13px, 1.3vw, 15px);
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Showcase del Ganador con su Carta de Partido */
.victory-showcase-box {
    margin: 0 0 30px;
}

.winner-showcase-card {
    background: linear-gradient(135deg, rgba(28, 36, 58, 0.96) 0%, rgba(14, 18, 30, 0.98) 100%);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 22px 24px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(224, 169, 109, 0.22);
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 26px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.winner-showcase-card.anarchist-mode {
    border-color: #B71C1C;
    background: linear-gradient(135deg, rgba(46, 12, 12, 0.96) 0%, rgba(16, 16, 18, 0.98) 100%);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(183, 28, 28, 0.35);
}

.winner-card-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1696 / 2528;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #000;
}

.winner-card-visual:hover {
    transform: scale(1.03);
    box-shadow: 0 14px 34px rgba(255, 195, 0, 0.45);
}

.winner-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.winner-card-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.88);
    color: var(--gold-bright);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    padding: 6px 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--gold);
}

.winner-card-content {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.winner-badge-pill {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(224, 169, 109, 0.2);
    color: var(--gold-bright);
    border: 1px solid rgba(224, 169, 109, 0.4);
}

.winner-player-title {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.winner-party-headline {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.winner-status-callout {
    display: inline-block;
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
}

.winner-lema-quote {
    font-size: 13.5px;
    font-style: italic;
    color: var(--gold);
    margin: 2px 0;
    line-height: 1.4;
}

.winner-rol-snippet, .winner-objective-snippet {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
}

.winner-showcase-card.anarchist-mode .winner-rol-snippet,
.winner-showcase-card.anarchist-mode .winner-objective-snippet {
    border-left-color: #B71C1C;
}

.winner-rol-snippet strong, .winner-objective-snippet strong {
    color: var(--text);
}

/* Galería de Identidades Secretas y Roles Revelados con las Cartas */
.revealed-roles-section {
    margin: 30px 0;
}

.revealed-section-header {
    margin-bottom: 16px;
    text-align: left;
}

.revealed-badge-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold-bright);
    background: rgba(224, 169, 109, 0.15);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 4px;
}

.revealed-section-title {
    font-size: 21px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.revealed-section-sub {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

.revealed-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 16px;
}

.revealed-player-card {
    background: #111726;
    border: 1.5px solid var(--surface-border);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.revealed-player-card:hover {
    transform: translateY(-2px);
    border-color: var(--p-color, var(--gold));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.revealed-player-card.is-winner {
    border: 2px solid var(--gold);
    background: linear-gradient(145deg, rgba(32, 26, 16, 0.92) 0%, rgba(16, 22, 38, 0.96) 100%);
    box-shadow: 0 8px 24px rgba(224, 169, 109, 0.25);
}

.revealed-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.revealed-player-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.revealed-avatar-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.revealed-names-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.revealed-player-name {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pill-me {
    font-size: 10px;
    font-weight: 800;
    background: var(--gold);
    color: #111;
    padding: 1px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.revealed-party-name {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.revealed-pill-tag {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    flex-shrink: 0;
}

.revealed-pill-tag.winner {
    background: linear-gradient(135deg, #e0a96d 0%, #ffc300 100%);
    color: #111;
    box-shadow: 0 2px 8px rgba(255, 195, 0, 0.4);
}

.revealed-card-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.revealed-card-thumb-wrap {
    width: 105px;
    aspect-ratio: 1696 / 2528;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #000;
}

.revealed-card-thumb-wrap:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(224, 169, 109, 0.35);
}

.revealed-card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.revealed-zoom-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    padding: 3px 0;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.revealed-card-texts {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12.5px;
}

.revealed-text-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.revealed-item-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--gold-bright);
    letter-spacing: 0.4px;
}

.revealed-item-val {
    margin: 0;
    line-height: 1.35;
    color: var(--text);
}

.revealed-item-val.lema-text {
    font-style: italic;
    color: var(--text-muted);
}

.revealed-item-val.rol-text {
    color: #e2e8f0;
    font-weight: 600;
}

.revealed-text-item.score-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2px;
}

.revealed-score-pts {
    font-size: 13.5px;
    font-weight: 800;
}

.revealed-score-pts.pos {
    color: var(--success);
}

.revealed-score-pts.neg {
    color: var(--danger);
}

/* Sección Marcador General */
.scoreboard-section {
    margin: 28px 0 20px;
}

.scoreboard-section-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    text-align: left;
}

.game-over-actions {
    text-align: center;
    margin-top: 24px;
}

.btn-play-again {
    max-width: 320px;
    margin: 0 auto;
    font-size: 15px;
    padding: 12px 24px;
}

/* ============================================================= */
/* MODALS & OVERLAYS                                             */
/* ============================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--gold-bright);
}

.modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--surface-border);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.modal-close:hover {
    background: rgba(239, 35, 60, 0.2);
    color: var(--danger);
    border-color: var(--danger);
}

.modal-body {
    padding: 16px 18px;
    overflow-y: auto;
}

/* Modal de Carta de Partido en Alta Resolución */
.modal-box-card {
    max-width: 440px;
    width: 92%;
    background: #0f1422;
    border: 2px solid var(--gold);
    border-radius: 18px;
    overflow: hidden;
}

.modal-full-party-img {
    width: 100%;
    max-height: 540px;
    aspect-ratio: 1696 / 2528;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: block;
    margin: 0 auto 12px;
}

.modal-full-party-img:not([src]),
.modal-full-party-img[src=""] {
    display: none;
}

.modal-party-info {
    text-align: left;
}

@media (max-width: 700px) {
    .winner-showcase-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 16px;
    }
    .winner-card-visual {
        max-width: 170px;
    }
    .winner-badge-pill, .winner-status-callout {
        align-self: center;
    }
    .revealed-cards-grid {
        grid-template-columns: 1fr;
    }
    .revealed-card-body {
        flex-direction: row;
        align-items: flex-start;
    }
    .revealed-card-thumb-wrap {
        width: 90px;
    }
}

/* ============================================================= */
/* MODAL: VISOR DE CARTA A PANTALLA COMPLETA (LIGHTBOX ZOOM)    */
/* ============================================================= */
.modal-card-zoom-overlay {
    z-index: 1500 !important;
    background: rgba(3, 5, 12, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.modal-card-zoom-overlay.active {
    display: flex !important;
    animation: zoomOverlayFadeIn 0.2s ease forwards;
}

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

.card-zoom-dialog {
    position: relative;
    max-width: min(94vw, 540px);
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: cardZoomPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    user-select: none;
}

@keyframes cardZoomPop {
    0% {
        opacity: 0;
        transform: scale(0.72) translateY(24px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.card-zoom-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(20, 25, 40, 0.95);
    border: 2px solid var(--gold);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8), 0 0 12px rgba(212, 175, 55, 0.3);
    transition: transform 0.15s ease, background 0.15s ease;
}

.card-zoom-close:hover {
    transform: scale(1.12);
    background: #ef233c;
    border-color: #ffffff;
}

.card-zoom-body {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zoom-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0b0f19;
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 12px 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(212, 175, 55, 0.35);
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.zoom-card-header {
    text-align: center;
    margin-bottom: 6px;
    width: 100%;
}

.zoom-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(212, 175, 55, 0.18);
    color: var(--gold-bright);
    border: 1px solid rgba(212, 175, 55, 0.4);
    margin-bottom: 4px;
}

.zoom-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--text);
    margin: 2px 0 0;
    line-height: 1.25;
}

.zoom-card-visual {
    position: relative;
    height: min(65vh, 520px);
    aspect-ratio: 1696 / 2528;
    max-width: 100%;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    margin: 4px auto 8px;
    container-type: inline-size;
}

.zoom-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zoom-card-footer {
    text-align: center;
    width: 100%;
    max-width: 440px;
    margin-top: 4px;
}

.zoom-quote {
    font-size: 12.5px;
    font-style: italic;
    color: var(--text-muted);
    margin: 4px 0;
    line-height: 1.35;
}

.zoom-extra-pill {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(243, 156, 18, 0.2);
    border: 1px solid rgba(243, 156, 18, 0.5);
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #f39c12;
    margin-top: 4px;
}

.party-info-footer {
    text-align: left;
}

.party-titular {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text);
    margin: 4px 0 2px;
    text-align: center;
}

.party-role-desc {
    background: var(--surface-light);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 6px;
    border: 1px solid var(--surface-border);
}

.card-zoom-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .card-zoom-close {
        top: -8px;
        right: -6px;
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    .zoom-card-container {
        padding: 10px 10px 8px;
        border-radius: 16px;
    }
    .zoom-card-visual {
        height: min(60vh, 460px);
    }
    .zoom-title {
        font-size: 14.5px;
    }
}

/* ============================================================= */
/* RECONEXIÓN Y ESTADO DE SESIÓN RESILIENTE                      */
/* ============================================================= */

.reconnect-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: linear-gradient(90deg, #c53030 0%, #e53e3e 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 16px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.badge-disconnected {
    background: #c53030 !important;
    color: #ffffff !important;
    animation: pulseDisconn 1.6s infinite ease-in-out;
}

@keyframes pulseDisconn {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.96); }
}

/* ============================================================= */
/* TRIBUNA DE DEBATE Y REGISTRO DE ACCIONES (CHAT PARLAMENTARIO) */
/* ============================================================= */

/* Botón flotante (Abajo a la derecha) */
.btn-toggle-chat {
    position: fixed !important;
    bottom: 12px !important;
    right: 10px !important;
    left: auto !important;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--gold-bright);
    color: var(--text-light);
    padding: 7px 13px;
    border-radius: 26px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(224, 169, 109, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

@media (max-width: 480px) {
    .reactions-bar {
        bottom: 8px !important;
        left: 6px !important;
        right: auto !important;
        padding: 3px 6px;
        gap: 3px;
    }
    .btn-reaction {
        font-size: 16px;
        padding: 2px 3px;
    }
    .btn-toggle-chat {
        bottom: 8px !important;
        right: 6px !important;
        left: auto !important;
        padding: 6px 10px;
        font-size: 12px;
        gap: 4px;
    }
}

.btn-toggle-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7), 0 0 18px rgba(224, 169, 109, 0.45);
    background: linear-gradient(135deg, #283548 0%, #172033 100%);
}

.btn-toggle-chat:active {
    transform: translateY(1px);
}

.chat-btn-icon {
    font-size: 16px;
}

.chat-btn-label {
    letter-spacing: 0.3px;
}

.chat-unread-badge {
    background: #e53e3e;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(229, 62, 62, 0.5);
    animation: badgeBounce 0.3s ease;
}

.chat-badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 9px;
    height: 9px;
    background: #e53e3e;
    border-radius: 50%;
    border: 1.5px solid #0f172a;
    box-shadow: 0 0 6px rgba(229, 62, 62, 0.8);
}

@keyframes badgeBounce {
    0% { transform: scale(0.4); }
    70% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Chat Drawer / Overlay */
.chat-drawer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
}

.chat-drawer.active {
    display: flex;
}

.chat-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 14, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.chat-drawer-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    height: 82vh;
    max-height: 680px;
    background: #0f172a;
    border: 1px solid var(--surface-border);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    animation: drawerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@media (min-width: 769px) {
    .chat-drawer {
        align-items: center;
        justify-content: flex-end;
        padding-right: 24px;
    }
    .chat-drawer-panel {
        height: 78vh;
        max-height: 640px;
        border-radius: 20px;
        animation: drawerSlideRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@keyframes drawerSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

/* Header */
.chat-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--surface-border);
}

.chat-drawer-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-drawer-icon {
    font-size: 22px;
}

.chat-drawer-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--gold-bright);
    margin: 0;
    line-height: 1.2;
}

.chat-drawer-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.chat-drawer-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
}

.chat-drawer-close:hover {
    background: rgba(229, 62, 62, 0.3);
    color: #ff8181;
    transform: scale(1.05);
}

/* Tabs */
.chat-filter-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--surface-border);
    padding: 6px 14px;
    gap: 6px;
}

.chat-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.chat-tab-btn.active {
    background: rgba(224, 169, 109, 0.15);
    color: var(--gold-bright);
}

/* Messages container */
.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.chat-empty-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
    padding: 30px 16px;
    margin: auto;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Messages */
.chat-msg-row {
    display: flex;
    flex-direction: column;
    animation: fadeInMsg 0.2s ease-out;
}

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

.chat-msg-row.msg-user-me {
    align-items: flex-end;
}

.chat-msg-row.msg-user-other {
    align-items: flex-start;
}

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-bottom: 3px;
    color: var(--text-muted);
}

.chat-msg-sender {
    font-weight: 700;
    color: #cbd5e1;
}

.chat-msg-row.msg-user-me .chat-msg-sender {
    color: var(--gold-bright);
}

.chat-msg-time {
    font-size: 10px;
    opacity: 0.7;
}

.chat-msg-bubble {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-msg-row.msg-user-me .chat-msg-bubble {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(30, 58, 138, 0.4) 100%);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-msg-row.msg-user-other .chat-msg-bubble {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-bottom-left-radius: 4px;
}

/* System / Actas Log Message */
.chat-msg-row.msg-system {
    align-items: stretch;
}

.chat-msg-system-card {
    background: rgba(224, 169, 109, 0.08);
    border: 1px solid rgba(224, 169, 109, 0.22);
    border-left: 3px solid var(--gold-bright);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #fef08a;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.chat-msg-system-card.sys-nominate {
    background: rgba(59, 130, 246, 0.09);
    border-color: rgba(59, 130, 246, 0.28);
    border-left-color: #60a5fa;
    color: #bfdbfe;
}

.chat-msg-system-card.sys-approved {
    background: rgba(34, 197, 94, 0.09);
    border-color: rgba(34, 197, 94, 0.28);
    border-left-color: #4ade80;
    color: #bbf7d0;
}

.chat-msg-system-card.sys-rejected,
.chat-msg-system-card.sys-anarchy {
    background: rgba(239, 68, 68, 0.09);
    border-color: rgba(239, 68, 68, 0.28);
    border-left-color: #f87171;
    color: #fecaca;
}

.chat-msg-system-card.sys-promulgate {
    background: rgba(234, 179, 8, 0.09);
    border-color: rgba(234, 179, 8, 0.28);
    border-left-color: #facc15;
    color: #fef08a;
}

.chat-system-text {
    flex: 1;
}

.chat-system-time {
    font-size: 10px;
    opacity: 0.65;
    white-space: nowrap;
}

/* Quick pills */
.chat-quick-pills {
    display: flex;
    overflow-x: auto;
    padding: 6px 14px 4px;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.6);
    scrollbar-width: none;
}

.chat-quick-pills::-webkit-scrollbar {
    display: none;
}

.quick-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.quick-pill:hover {
    background: rgba(224, 169, 109, 0.2);
    color: var(--gold-bright);
    transform: translateY(-1px);
}

/* Input Form */
.chat-input-form {
    display: flex;
    padding: 10px 14px 14px;
    gap: 8px;
    background: #0f172a;
    border-top: 1px solid var(--surface-border);
}

.chat-input {
    flex: 1;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid var(--surface-border);
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input:focus {
    border-color: var(--gold-bright);
    box-shadow: 0 0 8px rgba(224, 169, 109, 0.25);
}

.btn-chat-send {
    background: linear-gradient(135deg, var(--gold-bright) 0%, #b8860b 100%);
    color: #0b1120;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
}

.btn-chat-send:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.btn-chat-send:active {
    transform: scale(0.98);
}
