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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 4s infinite;
    pointer-events: none;
    z-index: 0;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.login-box h2 {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.2em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    padding: 14px 35px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 50%, #4ecdc4 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
    white-space: nowrap;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 2s infinite;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.6);
    background: linear-gradient(135deg, #ff8cb3 0%, #d45a7f 50%, #5eddd6 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.login-hint {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 0.9em;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Navbar */
.navbar {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.barraadmin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

.nav-content > div:first-child {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 1 auto;
    min-width: 0;
}

.nav-content > div:first-child h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user {
    color: #666;
    font-size: 0.9em;
}

.navbar h1 {
    color: #667eea;
    font-size: 1.5em;
}

.barraadmin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    color: white;
    position: relative;
    overflow: hidden;
}

.barraadmin::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

.barraadmin h1 {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.barraadmin .admin-user {
    color: rgba(255, 255, 255, 0.9);
}

.btn-logout {
    padding: 8px 20px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
    width: 100%;
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
        padding: 50px 40px;
    }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: transparent;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 20px;
}

@media (min-width: 1200px) {
    .dashboard-header {
        padding: 30px 40px;
        margin-bottom: 40px;
    }
    
    .dashboard-header h2 {
        font-size: 2.5em;
    }
}

.dashboard-header h2 {
    color: white;
    font-size: 2.2em;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    font-weight: 700;
    margin: 0;
}

.dashboard-header .btn-primary {
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Games List */
.games-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    width: 100%;
}

@media (min-width: 1200px) {
    .games-list {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 30px;
    }
}

@media (min-width: 1600px) {
    .games-list {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

.game-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    position: relative;
    z-index: 1;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 1200px) {
    .game-card {
        padding: 30px;
        min-height: 300px;
    }
    
    .game-info h3 {
        font-size: 1.3em;
    }
    
    .game-info p {
        font-size: 1em;
        margin: 6px 0;
    }
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.game-info h3 {
    color: #333;
    margin-bottom: 10px;
}

.game-info p {
    color: #666;
    margin: 5px 0;
    font-size: 0.9em;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-waiting {
    background: #ffc107;
    color: #333;
}

.status-playing {
    background: #28a745;
    color: white;
}

.status-finished {
    background: #6c757d;
    color: white;
}

.game-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-actions-primary {
    display: flex;
    gap: 10px;
}

.game-actions-secondary {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.game-card.game-inactive {
    opacity: 0.7;
    background: #f5f5f5;
}

.active-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.active-badge.active-yes {
    background: #28a745;
    color: white;
}

.active-badge.active-no {
    background: #dc3545;
    color: white;
}

.btn-secondary {
    padding: 12px 25px;
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(73, 80, 87, 0.3);
    letter-spacing: 0.5px;
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(73, 80, 87, 0.4);
}

.btn-back {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-back:hover::before {
    left: 100%;
}

.btn-play {
    padding: 10px 24px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-play:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.no-games {
    text-align: center;
    color: white;
    font-size: 1.2em;
    padding: 40px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-content.modal-scrollable {
    max-width: 700px;
    max-height: 90vh;
}

.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

/* Game Control Panel */
.game-control-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    max-width: 1200px;
    margin: 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    width: 100%;
}

@media (min-width: 1400px) {
    .game-control-panel {
        padding: 50px;
        max-width: 1400px;
    }
    
    .control-section {
        padding: 30px;
    }
    
    .control-section h2 {
        font-size: 1.8em;
    }
}

.game-control-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 4s infinite;
    pointer-events: none;
    z-index: 0;
}

.game-control-panel > * {
    position: relative;
    z-index: 1;
}

.control-section {
    margin-bottom: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.control-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.section-icon {
    font-size: 2em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.control-section h2 {
    color: #667eea;
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
    flex: 1;
}

.section-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1em;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    min-width: 50px;
    text-align: center;
}

.players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(102, 126, 234, 0.03);
    border-radius: 12px;
    min-height: 80px;
}

.player-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
}

.player-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.player-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.player-name {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
    text-align: center;
    width: 100%;
}

.empty-icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 1.1em;
    font-style: italic;
    color: #999;
}

.balls-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(255, 107, 157, 0.03);
    border-radius: 12px;
    min-height: 80px;
}

.ball-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 50%, #4ecdc4 100%);
    color: white;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.4em;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
    position: relative;
    overflow: hidden;
}

.ball-number::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

.ball-number:hover {
    transform: translateY(-5px) scale(1.15) rotate(5deg);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

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

.winner-info {
    font-size: 1.1em;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.winner-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.winner-category:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    transform: translateX(5px);
}

.winner-category.winner-bingo {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15) 0%, rgba(196, 69, 105, 0.15) 100%);
    border-left: 4px solid #ff6b9d;
    margin-top: 20px;
    padding: 20px;
}

.winner-category.winner-bingo:hover {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2) 0%, rgba(196, 69, 105, 0.2) 100%);
}

.winner-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.winner-icon {
    font-size: 1.5em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.winner-label strong {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
}

.winner-category.winner-bingo .winner-label strong {
    color: #ff6b9d;
    font-size: 1.2em;
}

.winner-value {
    flex: 0 0 auto;
    min-width: 150px;
    text-align: right;
}

.winner-name {
    color: #667eea;
    font-weight: 700;
    font-size: 1.15em;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    display: inline-block;
    border: 2px solid rgba(102, 126, 234, 0.3);
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.winner-name-bingo {
    color: #ff6b9d;
    font-weight: 800;
    font-size: 1.4em;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2) 0%, rgba(196, 69, 105, 0.2) 100%);
    border-radius: 10px;
    display: inline-block;
    border: 3px solid rgba(255, 107, 157, 0.5);
    font-family: 'Poppins', 'Montserrat', 'Roboto', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 10px rgba(255, 107, 157, 0.3);
    letter-spacing: 0.5px;
}

.winner-placeholder {
    color: #999;
    font-style: italic;
    font-size: 1em;
    padding: 8px 16px;
    display: inline-block;
}

.winner-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #667eea 50%, transparent 100%);
    margin: 20px 0;
    border-radius: 2px;
}
    color: #28a745;
    font-weight: 700;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 10px;
    border: 2px solid #28a745;
}

.winner-announcement {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    animation: pulse 2s infinite;
}

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

/* Toggle and Delete buttons */
.btn-toggle {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-activate {
    background: #28a745;
    color: white;
}

.btn-activate:hover {
    background: #218838;
}

.btn-deactivate {
    background: #ffc107;
    color: #333;
}

.btn-deactivate:hover {
    background: #e0a800;
}

.btn-delete {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #c82333;
}

/* Responsive Styles for Mobile */
@media (max-width: 768px) {
    /* Login Page Mobile */
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 25px 20px;
    }
    
    .login-box h2 {
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    /* Navbar Mobile */
    .nav-content {
        padding: 0 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav-content > div:first-child {
        flex: 1;
        min-width: 0;
    }
    
    .nav-content h1 {
        font-size: 1.1em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-content img {
        height: 40px !important;
    }
    
    .nav-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .btn-logout {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    /* Container Mobile */
    .container {
        padding: 20px 15px;
    }
    
    /* Dashboard Header Mobile */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px 15px;
    }
    
    .dashboard-header h2 {
        font-size: 1.5em;
    }
    
    .dashboard-header .btn-primary {
        width: 100%;
    }
    
    /* Games List Mobile */
    .games-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .game-card {
        padding: 20px;
        min-height: auto;
    }
    
    .game-info p {
        font-size: 0.85em;
        margin: 4px 0;
    }
    
    .game-info h3 {
        font-size: 1.1em;
    }
    
    /* Game Actions Mobile */
    .game-actions-primary,
    .game-actions-secondary {
        flex-direction: column;
        gap: 8px;
    }
    
    .game-actions-primary a,
    .game-actions-secondary button {
        width: 100%;
        text-align: center;
    }
    
    /* Modal Mobile */
    .modal-content {
        padding: 20px;
        width: 95%;
        max-width: none;
        margin: 10px;
    }
    
    .close {
        right: 15px;
        top: 15px;
        font-size: 24px;
    }
    
    /* Game Control Panel Mobile */
    .game-control-panel {
        padding: 20px 15px;
        margin: 0 10px;
    }
    
    .control-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .control-section h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .players-list,
    .balls-list {
        max-height: 200px;
        gap: 8px;
        padding: 8px;
    }
    
    .player-item {
        padding: 8px 14px;
        font-size: 0.85em;
    }
    
    .ball-number {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    .winner-info {
        font-size: 1.1em;
        padding: 12px;
    }
    
    .winner-announcement {
        font-size: 1.2em;
        padding: 15px 20px;
    }
    
    /* Game View Navbar Mobile */
    .barraadmin .nav-content {
        flex-wrap: wrap;
    }
    
    .barraadmin .nav-content > div:last-child {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .barraadmin .btn-secondary,
    .barraadmin .btn-logout {
        padding: 6px 12px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    /* Extra Small Screens */
    .login-box {
        padding: 20px 15px;
    }
    
    .dashboard-header h2 {
        font-size: 1.2em;
    }
    
    .game-card {
        padding: 15px;
    }
    
    .control-section h2 {
        font-size: 1em;
    }
    
    .nav-content h1 {
        font-size: 0.95em;
    }
}

