/* 
 * Lotería Family Night - Christmas Edition
 * Festive CSS Theme
 */

:root {
    /* Christmas Colors */
    --red: #c41e3a;
    --red-dark: #8b0000;
    --green: #228b22;
    --green-dark: #006400;
    --gold: #ffd700;
    --gold-dark: #daa520;
    --cream: #fffef0;
    --wood: #8b4513;
    --wood-light: #a0522d;
    
    /* Lotería traditional colors */
    --loteria-red: #e63946;
    --loteria-blue: #1d3557;
    --loteria-yellow: #f4a261;
    --loteria-cream: #f1faee;
    
    /* UI Colors */
    --bg-gradient: linear-gradient(135deg, #1a472a 0%, #2d5a3f 50%, #1a472a 100%);
    --card-bg: #fffef0;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --shadow: rgba(0, 0, 0, 0.3);
    --glow: rgba(255, 215, 0, 0.5);
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-light);
    min-height: 100vh;
}

/* ============================================
   SNOWFLAKES ANIMATION
   ============================================ */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    animation: snowfall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: 0s; font-size: 1rem; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: 2s; font-size: 1.5rem; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 8s; animation-delay: 4s; font-size: 1.2rem; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 1s; font-size: 1.8rem; }
.snowflake:nth-child(5) { left: 45%; animation-duration: 9s; animation-delay: 3s; font-size: 1rem; }
.snowflake:nth-child(6) { left: 55%; animation-duration: 11s; animation-delay: 5s; font-size: 1.4rem; }
.snowflake:nth-child(7) { left: 65%; animation-duration: 13s; animation-delay: 0s; font-size: 1.6rem; }
.snowflake:nth-child(8) { left: 75%; animation-duration: 10s; animation-delay: 2s; font-size: 1.1rem; }
.snowflake:nth-child(9) { left: 85%; animation-duration: 15s; animation-delay: 4s; font-size: 1.3rem; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 8s; animation-delay: 1s; font-size: 1.7rem; }

@keyframes snowfall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* ============================================
   JOIN PAGE
   ============================================ */
.join-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.join-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 10;
}

.christmas-lights {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.christmas-lights span {
    font-size: 1.2rem;
    animation: twinkle 1s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.15s);
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

.game-title {
    margin-bottom: 5px;
}

.title-loteria {
    display: block;
    font-family: 'Alfa Slab One', serif;
    font-size: 3.5rem;
    color: var(--gold);
    text-shadow: 
        3px 3px 0 var(--red),
        6px 6px 0 var(--red-dark),
        0 0 30px var(--glow);
    letter-spacing: 4px;
}

.title-night {
    display: block;
    font-size: 1.5rem;
    color: var(--cream);
    font-weight: 600;
    margin-top: -5px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 30px;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 18px 60px 18px 24px;
    font-size: 1.2rem;
    font-family: 'Nunito', sans-serif;
    border: 3px solid var(--gold);
    border-radius: 50px;
    background: var(--cream);
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: var(--red);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.input-wrapper input::placeholder {
    color: #999;
}

.input-decoration {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
}

.join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    font-size: 1.4rem;
    font-family: 'Alfa Slab One', serif;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.join-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.5);
}

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

.join-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.6rem;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.error-message {
    color: #ff6b6b;
    font-weight: 600;
    min-height: 24px;
}

.host-link {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.host-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.host-link a:hover {
    color: var(--gold);
}

/* ============================================
   PLAYER BOARD PAGE
   ============================================ */
.player-page {
    padding: 10px;
    padding-bottom: 100px;
    min-height: 100vh;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin-bottom: 10px;
}

.player-name {
    font-family: 'Alfa Slab One', serif;
    font-size: 1.2rem;
    color: var(--gold);
}

.current-pattern {
    font-size: 0.9rem;
    color: var(--cream);
    background: var(--red);
    padding: 5px 12px;
    border-radius: 20px;
}

/* Lotería Board */
.board-container {
    max-width: 400px;
    margin: 0 auto;
}

.loteria-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: var(--wood);
    padding: 10px;
    border-radius: 12px;
    border: 4px solid var(--gold);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

.board-cell {
    aspect-ratio: 1;
    background: var(--card-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--loteria-blue);
    padding: 4px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.board-cell:active {
    transform: scale(0.95);
}

.board-cell.marked {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    border-color: var(--gold);
}

.board-cell.marked .card-emoji {
    filter: brightness(0) invert(1);
}

.board-cell.marked .card-name {
    color: white;
}

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

.card-name {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--loteria-blue);
    text-align: center;
    margin-top: 2px;
    line-height: 1.1;
}

.card-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--red);
}

.board-cell.marked .card-number {
    color: var(--gold);
}

/* Bean marker */
.bean-marker {
    position: absolute;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle at 30% 30%, #8B4513, #5D3A1A);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 
        inset -3px -3px 6px rgba(0, 0, 0, 0.4),
        inset 2px 2px 4px rgba(255, 255, 255, 0.2),
        2px 2px 4px rgba(0, 0, 0, 0.3);
}

.board-cell.marked .bean-marker {
    opacity: 1;
}

/* Player Actions */
.player-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(26, 71, 42, 0.98) 0%, rgba(26, 71, 42, 0.9) 100%);
    border-top: 2px solid var(--gold);
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    z-index: 100;
}

.action-btn {
    padding: 12px 20px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--text-dark);
    font-size: 1.1rem;
    padding: 15px 30px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.action-btn.danger {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Last Called Card Display */
.last-called {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
}

.last-called-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.last-called-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
}

.last-called-card .emoji {
    font-size: 2rem;
}

.last-called-card .name {
    font-family: 'Alfa Slab One', serif;
    color: var(--gold);
}

/* ============================================
   TV DISPLAY PAGE
   ============================================ */
.tv-page {
    min-height: 100vh;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.tv-header {
    text-align: center;
    margin-bottom: 20px;
}

.tv-title {
    font-family: 'Alfa Slab One', serif;
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 3px 3px 0 var(--red);
}

.tv-pattern {
    font-size: 1.5rem;
    color: var(--cream);
    margin-top: 5px;
}

.tv-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.current-card-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.current-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 8px solid var(--gold);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    min-width: 350px;
    animation: cardPulse 2s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px 10px rgba(255, 215, 0, 0.3); }
}

.current-card .card-number-big {
    font-family: 'Alfa Slab One', serif;
    font-size: 3rem;
    color: var(--red);
}

.current-card .card-emoji-big {
    font-size: 8rem;
    line-height: 1;
    margin: 20px 0;
}

.current-card .card-name-big {
    font-family: 'Alfa Slab One', serif;
    font-size: 2.5rem;
    color: var(--loteria-blue);
}

.current-card .card-verse {
    font-style: italic;
    color: #666;
    margin-top: 10px;
    font-size: 1.1rem;
}

/* Previous Cards */
.previous-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.previous-cards-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.prev-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 4px solid rgba(255, 215, 0, 0.5);
    opacity: 0.8;
}

.prev-card .prev-emoji {
    font-size: 3rem;
}

.prev-card .prev-name {
    font-family: 'Alfa Slab One', serif;
    font-size: 1rem;
    color: var(--loteria-blue);
    margin-top: 5px;
}

/* Sidebar */
.tv-sidebar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 20px;
}

.players-list {
    margin-top: 15px;
}

.players-list h3 {
    color: var(--gold);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.player-item {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-item .player-icon {
    font-size: 1.2rem;
}

.cards-remaining {
    text-align: center;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    margin-top: 15px;
}

.cards-remaining .number {
    font-family: 'Alfa Slab One', serif;
    font-size: 2rem;
    color: var(--gold);
}

.cards-remaining .label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   HOST/GM PAGE
   ============================================ */
.host-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.host-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.host-title {
    font-family: 'Alfa Slab One', serif;
    font-size: 2rem;
    color: var(--gold);
}

.host-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.control-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.control-panel h3 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.control-row label {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
}

.control-row select,
.control-row input[type="number"] {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Nunito', sans-serif;
}

.control-row select option {
    background: #1a472a;
    color: white;
}

.host-btn {
    width: 100%;
    padding: 15px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.host-btn.start {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: white;
}

.host-btn.pause {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--text-dark);
}

.host-btn.reset {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white;
}

.host-btn.mini-game {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

/* ============================================
   MINI GAME OVERLAYS
   ============================================ */
.mini-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

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

.mini-game-content {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 4px solid var(--gold);
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.3);
}

.mini-game-title {
    font-family: 'Alfa Slab One', serif;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 20px;
}

/* Coin Flip */
.coin {
    width: 150px;
    height: 150px;
    margin: 30px auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.coin.flipping {
    animation: coinFlip 2s ease-out forwards;
}

@keyframes coinFlip {
    0% { transform: rotateY(0); }
    100% { transform: rotateY(1800deg); }
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    backface-visibility: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.coin-heads {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

.coin-tails {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
    transform: rotateY(180deg);
}

/* Wheel Spin */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    z-index: 10;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

/* High-Low Cards */
.card-deck {
    perspective: 1000px;
    margin: 30px auto;
}

.playing-card {
    width: 120px;
    height: 168px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

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

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.card-back {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    border: 3px solid var(--gold);
}

.card-front {
    background: white;
    transform: rotateY(180deg);
    flex-direction: column;
}

.card-value {
    font-family: 'Alfa Slab One', serif;
    color: var(--text-dark);
}

.card-suit {
    font-size: 2rem;
}

.card-suit.red { color: var(--red); }
.card-suit.black { color: #1a1a1a; }

/* High-Low Buttons */
.highlow-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.highlow-btn {
    padding: 20px 40px;
    font-family: 'Alfa Slab One', serif;
    font-size: 1.5rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.highlow-btn.high {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: white;
}

.highlow-btn.low {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white;
}

.highlow-btn:hover {
    transform: scale(1.05);
}

/* ============================================
   WINNER / LOSER SCREENS
   ============================================ */
.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.result-overlay.winner {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.95) 0%, rgba(0, 100, 0, 0.95) 100%);
}

.result-overlay.loser {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.95) 0%, rgba(100, 0, 0, 0.95) 100%);
}

.result-content {
    text-align: center;
    padding: 40px;
}

.result-icon {
    font-size: 8rem;
    animation: bounce 0.5s ease infinite;
}

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

.result-title {
    font-family: 'Alfa Slab One', serif;
    font-size: 4rem;
    color: var(--gold);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    margin: 20px 0;
}

.result-name {
    font-family: 'Alfa Slab One', serif;
    font-size: 3rem;
    color: white;
}

.result-message {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3001;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   LOGIN MODAL
   ============================================ */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.login-box {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    border: 3px solid var(--gold);
}

.login-box h2 {
    font-family: 'Alfa Slab One', serif;
    color: var(--gold);
    text-align: center;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 15px;
}

.login-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-box button {
    width: 100%;
    padding: 15px;
    font-family: 'Alfa Slab One', serif;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--text-dark);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .tv-main {
        grid-template-columns: 1fr;
    }
    
    .tv-sidebar {
        order: -1;
    }
    
    .current-card {
        min-width: auto;
        padding: 20px;
    }
    
    .current-card .card-emoji-big {
        font-size: 5rem;
    }
    
    .current-card .card-name-big {
        font-size: 1.8rem;
    }
    
    .title-loteria {
        font-size: 2.5rem;
    }
    
    .board-cell {
        padding: 2px;
    }
    
    .card-emoji {
        font-size: 1.5rem;
    }
    
    .card-name {
        font-size: 0.45rem;
    }
}

@media (max-width: 400px) {
    .player-actions {
        padding: 10px;
    }
    
    .action-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .action-btn.primary {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* Status indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-indicator.waiting {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-indicator.playing {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-indicator.paused {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
