/* /assets/style.css - TAVERN PREMIUM THEME */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;900&display=swap');

:root {
    --bg-dark: #0a0604;
    --bg-card: rgba(45, 27, 16, 0.95);
    --accent: #fcd34d;
    --gold: #d4af37;
    --glass: rgba(255, 255, 255, 0.05);
    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa;
    --red: #ef4444;
    --blue: #0284c7;
    --leather-border: #4d2d18;
    --leather-dark: #2d1b10;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: url('assets/hero.webp') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%);
    z-index: -1;
}

.container {
    width: 98%;
    max-width: 1200px;
    margin: 0.5rem auto;
    background: var(--bg-card);
    border: 3px solid var(--leather-border);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9), inset 0 0 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
}

@media (min-width: 480px) {
    .container {
        width: 95%;
        margin: 1rem auto;
        border-width: 4px;
        border-radius: 2rem;
    }
}

@media (min-width: 768px) {
    .container {
        border-width: 8px;
        margin: 1.5rem auto;
    }
}

/* Header */
.header {
    background: rgba(0,0,0,0.5);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--leather-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .header {
        padding: 1.2rem 2.5rem;
    }
}

.pill-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--gold);
    padding: 0.4rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Game Table Layout */
.game-table {
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
}

@media (min-width: 992px) {
    .game-table {
        grid-template-columns: 1fr 340px;
        min-height: 600px;
    }
}

.main-board {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: url('../assets/chicas.webp') no-repeat center bottom / cover;
    box-shadow: inset 0 0 120px rgba(0,0,0,0.9);
    min-height: 400px;
}

@media (min-width: 768px) {
    .main-board {
        padding: 2rem;
    }
}

/* Bote Pill */
.bote-pill {
    background: linear-gradient(180deg, #7c2d12 0%, #451a03 100%);
    border: 1px solid var(--gold);
    padding: 0.4rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

@media (min-width: 768px) {
    .bote-pill {
        padding: 0.6rem 2.5rem;
        gap: 1rem;
        margin-bottom: 3rem;
    }
}

.bote-pill span {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

/* Dice & Physics */
.dice-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    perspective: 1000px;
    flex-wrap: wrap;
}

@media (min-width: 480px) {
    .dice-container {
        gap: 1rem;
    }
}

.dice {
    width: clamp(50px, 14vw, 75px);
    height: clamp(50px, 14vw, 75px);
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 0 #cbd5e1, 0 10px 20px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.dice.kept {
    background: var(--gold);
    box-shadow: 0 6px 0 #b45309, 0 10px 25px rgba(251, 191, 36, 0.3);
    transform: translateY(-4px);
}

.dice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 70%;
    height: 70%;
    gap: 2px;
}

.dot {
    width: 10px;
    height: 10px;
    background: #1e293b;
    border-radius: 50%;
    margin: auto;
}

.dice.kept .dot { background: #451a03; }

/* Hand Info */
.hand-label {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
    margin-bottom: 0.2rem;
}

.sub-label {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.prob-stats {
    background: rgba(0,0,0,0.5);
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass);
    backdrop-filter: blur(4px);
}

.prob-stats b { color: var(--accent); }

.controls {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    width: 100%;
}

@media (min-width: 480px) {
    .controls {
        gap: 1.5rem;
    }
}

.btn-arcade {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .btn-arcade {
        padding: 1.2rem 3rem;
        font-size: 1.1rem;
        gap: 0.8rem;
    }
}

.btn-blue {
    background: linear-gradient(180deg, #0ea5e9 0%, #0369a1 100%);
    color: white;
    box-shadow: 0 6px 0 #075985, 0 10px 20px rgba(3, 105, 161, 0.4);
}

.btn-blue:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #075985;
}

.btn-brown {
    background: linear-gradient(180deg, #57534e 0%, #292524 100%);
    color: #e7e5e4;
    border: 1px solid var(--leather-border);
    box-shadow: 0 6px 0 #1c1917, 0 10px 20px rgba(0,0,0,0.3);
}

.btn-brown:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #1c1917;
}

/* Sidebar */
.players-sidebar {
    background: rgba(0,0,0,0.4);
    border-top: 2px solid var(--leather-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .players-sidebar {
        border-top: none;
        border-left: 2px solid var(--leather-border);
        padding: 2rem;
    }
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* --- LOBBY AMBITIOUS STYLES --- */
.lobby-body {
    background: #0c0a09;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    overflow-x: hidden;
}

.lobby-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('../assets/chicas.webp') no-repeat center center / cover;
    opacity: 0.15;
    filter: blur(10px) brightness(0.5);
    z-index: -1;
}

.lobby-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--leather-border);
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    flex-wrap: wrap;
    gap: 1rem;
}

@media (min-width: 768px) {
    .lobby-header {
        padding: 1rem 2rem;
        border-radius: 1.5rem;
        margin-bottom: 2rem;
        gap: 2rem;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-orb {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--gold), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(212,175,55,0.4));
}

.brand-text h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 2px;
    margin: 0;
    color: var(--gold);
}

.brand-text span {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--text-secondary);
    font-weight: 700;
}

.user-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-grow: 1;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .user-control {
        gap: 2rem;
        flex-grow: 0;
    }
}

.credits-badge {
    background: var(--leather-dark);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 0 20px rgba(212,175,55,0.1);
}

.credits-badge .val {
    font-weight: 800;
    color: var(--gold);
    font-family: 'Montserrat', sans-serif;
}

.user-profile-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 2rem;
    border-left: 1px solid var(--leather-border);
}

.profile-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.profile-info .name { font-weight: 800; font-size: 0.95rem; }
.profile-info .rank { font-size: 0.7rem; color: var(--accent); font-weight: 600; }

.avatar-container {
    width: 48px;
    height: 48px;
    position: relative;
    cursor: pointer;
}

.avatar-container img {
    width: 100%; height: 100%;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.avatar-edit {
    position: absolute;
    bottom: -4px; right: -4px;
    background: var(--accent);
    color: #fff;
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-dark);
}

.nav-actions {
    display: flex;
    gap: 0.8rem;
}

.nav-icon {
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.nav-icon:hover { transform: scale(1.2); }

/* HERO ARCADE */
.hero-arcade {
    background: var(--leather-dark);
    border-radius: 1.5rem;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid var(--leather-border);
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

@media (min-width: 768px) {
    .hero-arcade {
        grid-template-columns: 1.2fr 0.8fr;
        border-radius: 2rem;
        margin-bottom: 3rem;
    }
}

.hero-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, #1c1917, rgba(28,25,23,0.8));
}

@media (min-width: 768px) {
    .hero-content {
        padding: 3rem;
        background: linear-gradient(90deg, #1c1917, transparent);
    }
}

.badge-new {
    background: var(--accent);
    color: #fff;
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    width: fit-content;
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.hero-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.btn-primary-casino {
    background: linear-gradient(to right, var(--gold), #b45309);
    color: #000;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(212,175,55,0.3);
    transition: all 0.3s;
}

.btn-primary-casino:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212,175,55,0.5);
}

.pot-info {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pot-info span { color: var(--accent); font-weight: 800; }

.hero-image {
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.1);
    min-height: 200px;
}

/* LOBBY GRID */
.lobby-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .lobby-grid {
        grid-template-columns: 1fr 340px;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
}

.dot-online {
    display: inline-block;
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 0.5rem;
    box-shadow: 0 0 10px #10b981;
}

.btn-small-gold {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.join-code-bar {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid var(--leather-border);
}

.join-code-bar form { display: flex; gap: 1rem; }
.join-code-bar input {
    flex-grow: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--leather-border);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    color: #fff;
    font-weight: 600;
}

.join-code-bar button {
    background: var(--gold);
    color: #000;
    border: none;
    padding: 0 2rem;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.room-card-premium {
    background: var(--leather-dark);
    border: 1px solid var(--leather-border);
    padding: 1.5rem;
    border-radius: 1.2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.room-card-premium:hover { transform: translateY(-5px); border-color: var(--gold); }

.room-rank {
    position: absolute;
    top: 0; right: 0;
    background: var(--gold);
    color: #000;
    font-size: 0.55rem;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 0 0 0 10px;
}

.room-info .code {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.room-info .host { font-size: 0.8rem; color: var(--text-secondary); }

.room-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--leather-border);
}

.room-status .players { font-weight: 800; font-size: 0.9rem; }
.btn-join {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
}

/* SIDEBAR SOCIAL */
.lobby-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.friends-box, .invites-box {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--leather-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
}

.friends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.friends-header h4 { font-weight: 800; font-size: 0.9rem; margin: 0; }

.btn-add-friend {
    background: var(--leather-border);
    border: none;
    color: #fff;
    width: 24px; height: 24px;
    border-radius: 50%;
    cursor: pointer;
}

.friend-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.friend-avatar {
    width: 36px; height: 36px;
    background: var(--leather-border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8rem;
    color: var(--gold);
}

.friend-info { display: flex; flex-direction: column; flex-grow: 1; }
.friend-info .fname { font-weight: 600; font-size: 0.85rem; }
.friend-info .fstatus { font-size: 0.65rem; color: var(--text-secondary); }

.status-dot {
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.player-card-premium {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass);
    padding: 1.2rem;
    border-radius: 1.2rem;
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tournament-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.6rem;
    margin-top: 1rem;
}

.grid-cell {
    aspect-ratio: 1;
    background: rgba(0,0,0,0.5);
    border: 1px dashed var(--leather-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes roll-shake {
    0% { transform: rotate(-10deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
    100% { transform: rotate(-10deg) scale(1); }
}

.rolling {
    animation: roll-shake 0.15s infinite;
}

.landed {
    animation: bounce-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Portrait Mode Enhancements */
@media (max-width: 768px) {
    #orientation-warning { display: none !important; }
    
    .game-table {
        grid-template-columns: 1fr;
    }
    
    .players-sidebar {
        border-left: none;
        border-top: 2px solid var(--leather-border);
    }
}

.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--gold);
    color: #000;
    padding: 0.8rem 2rem;
    border-radius: 1rem;
    font-weight: 800;
    z-index: 9999;
}

/* Auth Pages */
.auth-card {
    width: 90%;
    max-width: 450px;
    margin: 2rem auto;
    background: var(--bg-card);
    border: 4px solid var(--leather-border);
    border-radius: 2rem;
    padding: 2rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.8);
}

@media (min-width: 768px) {
    .auth-card {
        margin: 5rem auto;
        padding: 3rem;
    }
}

.auth-card h1 {
    text-align: center;
    color: var(--gold);
    font-weight: 900;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--leather-border);
    padding: 0.8rem 1.2rem;
    border-radius: 0.8rem;
    color: #fff;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(0,0,0,0.5);
}

.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #b38b28);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}
