:root {
    --primary: #9a1a1a;
    --primary-light: #c53030;
    --primary-dark: #741515;
    --accent: #d4af37;
    --accent-glow: #f6e05e;
    --background: #fdf6e3;
    --text-main: #2d1a10;
    --text-light: #fff;
    --board-bg: #5d4037;
    --board-border: #3e2723;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.5;
    overflow-x: hidden;
    /* Subtle paper texture */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

h1,
h2,
h3 {
    font-family: 'Merriweather', serif;
}

.hidden {
    display: none !important;
}

/* --- APP CONTAINER --- */
.app-container {
    min-height: 100vh;
    position: relative;
}

/* --- SETUP SCREEN --- */
.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    width: 100%;
}

.content-wrapper {
    width: 100%;
    max-width: 1000px;
    z-index: 10;
    margin: 0 auto;
}

.main-header {
    text-align: center;
    margin-bottom: 2rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -1px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-main);
    display: inline-block;
    padding: 0.25rem 1rem;
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
}

.setup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .setup-grid {
        grid-template-columns: 1fr 1fr;
    }

    .title {
        font-size: 4rem;
    }
}

.player-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.player-card:hover {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed #eee;
}

.icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(154, 26, 26, 0.3);
}

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

.form-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #888;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid #eee;
    font-size: 1rem;
    background: #fafafa;
    transition: all 0.2s;
    font-family: 'Roboto', sans-serif;
}

input[type="text"]:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(154, 26, 26, 0.1);
}

.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.token-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid #f0f0f0;
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.token-btn:hover:not(:disabled) {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.token-btn.selected {
    border-color: var(--primary);
    background-color: #fff5f5;
    box-shadow: 0 0 0 2px var(--primary);
}

.token-visual {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.token-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
}

.start-action {
    margin: 3rem 0;
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 99px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(154, 26, 26, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(154, 26, 26, 0.5);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-large {
    font-size: 1.25rem;
    padding: 1.25rem 3rem;
}

/* --- NEW LAYOUT: 3 COLUMNS --- */
.game-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

@media (min-width: 1024px) {
    .game-layout {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }
}

.center-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

.side-panel {
    flex: 1;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-card-game {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
    transition: all 0.3s;
    text-align: center;
}

.player-card-game.active {
    border-color: var(--accent);
    background: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
    z-index: 10;
}

.player-game-info {
    margin-bottom: 1.5rem;
}

.player-game-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
}

.player-game-info p {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.player-game-info .score {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-top: 0.5rem;
    color: var(--text-main);
}

.token-mini {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
}

.dice-section {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
}

.dice-visual-mini {
    width: 4rem;
    height: 4rem;
    background: white;
    border-radius: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #eee;
}

.dice-visual-mini svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text-main);
}

.btn-roll-side {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    background: var(--primary);
    color: white;
    border-radius: 0.75rem;
    border: none;
    font-weight: 700;
    cursor: not-allowed;
    transition: all 0.2s;
    opacity: 0.5;
}

.btn-roll-side:not(:disabled) {
    opacity: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(154, 26, 26, 0.4);
}

.btn-roll-side:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(154, 26, 26, 0.5);
    background: var(--primary-light);
}


/* --- GAME BOARD --- */
.game-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.board-wrapper {
    position: relative;
    padding: 1.5rem;
    background: var(--board-border);
    border-radius: 2rem;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.5),
        0 20px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
    margin: 4rem 0 2rem 0;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    gap: 8px;
    width: 100%;
    aspect-ratio: 1;
    background: var(--board-bg);
    padding: 12px;
    border-radius: 1.5rem;
    /* Wood pattern */
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 8px);
}

.cell {
    position: relative;
    background-color: #e2e8f0;
    background-size: cover;
    background-position: center;
    border-radius: 0.75rem;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid #8d6e63;
    overflow: hidden;
}

.cell:hover {
    transform: translateY(-5px) scale(1.05);
    z-index: 20;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.cell::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.6));
    border-radius: 0.5rem;
}

.cell.empty {
    visibility: hidden;
    pointer-events: none;
}

.cell-number {
    position: absolute;
    top: 4px;
    left: 4px;
    background: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--text-main);
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--accent);
}

.cell.peña {
    border-color: #9333ea;
}

.cell.peña .cell-number {
    border-color: #9333ea;
    color: #9333ea;
}

.cell.peña::after {
    background: linear-gradient(to bottom, rgba(147, 51, 234, 0.2), rgba(147, 51, 234, 0.6));
}

.cell.meta {
    border-color: var(--accent);
}

.cell.highlight {
    animation: bounceHighlight 1s infinite;
    border-color: var(--accent-glow);
    box-shadow: 0 0 20px var(--accent-glow);
    z-index: 15;
}

@keyframes bounceHighlight {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

.cell-tokens {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
    z-index: 10;
}

.board-title-overlay {
    position: absolute;
    top: -3.5rem;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 0;
}

.board-title-overlay h2 {
    color: var(--text-main);
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 2px 2px 0px white;
    letter-spacing: -1px;
}

.badge {
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
}

/* --- GAME MESSAGES --- */
.game-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    z-index: 100;
    text-align: center;
    border: 4px solid var(--primary);
    min-width: 300px;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.message-content {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

#msg-subtext {
    font-size: 1rem;
    color: #555;
}

/* --- MODAL --- */
.modal-overlay {
    background: rgba(45, 26, 16, 0.8);
    /* Dark Brown Overlay */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-card {
    background: white;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid white;
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-header {
    height: 250px;
    position: relative;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 2rem 1.5rem 1rem;
    color: white;
}

.modal-title-overlay h2 {
    font-size: 2rem;
    margin: 0;
}

.modal-title-overlay p {
    margin: 0;
    font-weight: 500;
    opacity: 0.9;
}

.modal-body {
    padding: 1.5rem;
}

#modal-desc {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #444;
}

.modal-rule-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-rule-box h3 {
    color: #15803d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.modal-rule-box p {
    font-size: 0.85rem;
    color: #166534;
    margin: 0;
}

.btn-block {
    display: flex;
    width: 100%;
    text-decoration: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* --- VICTORY SCREEN --- */
.victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 500;
}

.victory-card {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trophy-icon {
    width: 5rem;
    height: 5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.winner-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background: #fffbeb;
    border-radius: 1rem;
    border: 2px solid var(--accent);
}

@keyframes popIn {
    from {
        transform: scale(0.8) translate(-50%, -50%);
        opacity: 0;
    }

    to {
        transform: scale(1) translate(-50%, -50%);
        opacity: 1;
    }
}

/* Note: translate correction for centered fixed elements handled via top/left/transform combo. 
   The keyframe popIn assumes transform originates from center. */

/* --- NEW BUTTON SIZES & VARIANTS --- */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(154, 26, 26, 0.2);
}

/* For non-fixed elements (like victory card inside flex container), simple scale works. */
@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- BRANDING LOGOS & FOOTER --- */
.top-logos {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    gap: 1.5rem;
    z-index: 50;
    align-items: center;
}

.top-logos img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.game-footer-banner {
    width: 100%;
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
    z-index: 50;
    margin-top: auto;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}

.game-footer-banner .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.game-footer-banner p {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.footer-logos {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.footer-logos img {
    height: 50px;
    width: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Mobile Adjustments */
@media (max-width: 1023px) {
    .top-logos {
        position: relative;
        top: 0;
        left: 0;
        justify-content: center;
        width: 100%;
        padding: 1.5rem 0 0 0;
    }

    .top-logos img {
        height: 50px;
    }

    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
        padding: 0.2rem 0.5rem;
    }

    .game-layout {
        gap: 0.5rem;
    }

    /* Keep side panels stacked vertically but very compact */
    .side-panel {
        max-width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }

    .player-card-game {
        width: 100%;
        flex-direction: row;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 1rem;
        text-align: left;
    }

    .player-game-info {
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .token-mini {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
        margin: 0;
        border-width: 2px;
    }

    .player-game-info h3 {
        display: block;
        font-size: 0.9rem;
        margin: 0;
    }

    .player-game-info p {
        display: none; /* Hide 'Jugador 1' text to save space */
    }

    .player-game-info .score {
        font-size: 1.25rem;
        margin-left: 0.25rem;
    }

    .dice-section {
        min-height: auto;
        flex-direction: row;
        gap: 0.5rem;
        padding-top: 0;
        border-top: none;
    }

    .btn-roll-side {
        width: auto;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .dice-visual-mini {
        width: 2rem;
        height: 2rem;
        border-radius: 0.5rem;
    }

    .dice-visual-mini svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    /* Shrink the board to fit phones */
    .board-wrapper {
        padding: 0.5rem;
        margin: 3rem 0 1rem 0;
        border-radius: 1rem;
    }

    .board-grid {
        gap: 3px;
        padding: 6px;
        border-radius: 0.75rem;
    }

    .cell {
        border-width: 2px;
        border-radius: 0.35rem;
    }
    
    .cell-number {
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.6rem;
        top: 2px;
        left: 2px;
        border-width: 1px;
    }
    
    .token {
        width: 0.8rem !important;
        height: 0.8rem !important;
        font-size: 0.5rem !important;
        border-width: 1px !important;
    }

    .board-title-overlay h2 {
        font-size: 1.25rem;
        top: -2rem;
    }
}

/* Aggressive Mobile Adjustments for Phones (like Nubia Z60 Ultra) */
@media (max-width: 600px) {
    .top-logos {
        padding: 1rem 0 0 0;
    }

    .top-logos img {
        height: 40px;
    }

    .footer-logos {
        gap: 1rem;
    }

    .footer-logos img {
        height: 40px;
        padding: 0.3rem;
    }

    .title {
        font-size: 1.5rem;
    }
    
    .board-wrapper {
        margin: 2.5rem 0 0.5rem 0;
        padding: 0.25rem;
        border-radius: 0.5rem;
    }
    
    .board-grid {
        gap: 2px;
        padding: 4px;
        border-radius: 0.5rem;
    }
    
    .board-title-overlay h2 {
        font-size: 1rem;
        top: -1.75rem;
    }
    
    .cell {
        border-width: 1px;
        border-radius: 0.25rem;
    }
    
    .cell-number {
        width: 1rem;
        height: 1rem;
        font-size: 0.5rem;
        top: 1px;
        left: 1px;
    }
    
    .token {
        width: 0.6rem !important;
        height: 0.6rem !important;
        font-size: 0.4rem !important;
    }
    
    .player-card-game {
        padding: 0.5rem;
    }
    
    .token-mini {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }
    
    .player-game-info h3 {
        font-size: 0.8rem;
    }
    
    .player-game-info .score {
        font-size: 1rem;
    }
    
    .dice-visual-mini {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .btn-roll-side {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .modal-card {
        width: 95%;
    }
    
    .modal-header {
        height: 180px;
    }
    
    .modal-title-overlay h2 {
        font-size: 1.25rem;
    }
}