/* style.css - Diseño responsive completo */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- HEADER Y NAV --- */
header {
    background: #0a2e5c;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    flex-wrap: wrap;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.8em;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: #ddd;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s;
}

nav a:hover {
    color: #66ccff;
}

.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.9em;
}

.user-actions .welcome {
    display: none; /* Mostrar solo en mobile con JS si quieres */
}

.user-actions .saldo {
    background: #0066cc;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    min-width: 100px;
    text-align: center;
}

.btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* --- BANNER DE PUBLICIDAD SUPERIOR --- */
.ad-banner-top {
    width: 100%;
    height: 100px;
    background: url('../img/banner-top.jpg') no-repeat center;
    background-size: cover;
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
}

.ad-banner-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- LAYOUT PRINCIPAL --- */
.main-content {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    flex-wrap: wrap;
}

/* --- SIDEBAR CON PUBLICIDAD --- */
.sidebar {
    flex: 0 0 250px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    align-self: flex-start;
}

.ad-banner-sidebar {
    width: 100%;
    height: 300px;
    background: url('../img/banner-sidebar.jpg') no-repeat center;
    background-size: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ad-banner-sidebar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar h3 {
    margin-bottom: 15px;
    color: #0a2e5c;
    font-size: 1.2em;
}

/* --- EVENTOS --- */
.events-container {
    flex: 1;
    min-width: 300px;
}

.featured-events h2,
.bet-history h2 {
    color: #0a2e5c;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.events-list {
    display: grid;
    gap: 15px;
}

.event {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.event strong {
    font-size: 1.1em;
    color: #0a2e5c;
}

.odd {
    font-weight: bold;
    color: #d9534f;
}

.apuesta-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.apuesta-form input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100px;
    font-size: 1em;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.9em;
}

/* --- TABLAS --- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #0a2e5c;
    color: white;
    font-weight: 600;
}

.table tr:hover {
    background: #f8f9fa;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 30px 0;
    background: #0a2e5c;
    color: white;
    margin-top: 40px;
}

/* --- BANNER MOBILE --- */
.ad-banner-mobile {
    width: 100%;
    height: 80px;
    background: url('../img/banner-mobile.jpg') no-repeat center;
    background-size: cover;
    border-radius: 8px;
    margin: 15px 0;
    display: none; /* Mostrar solo en mobile */
    overflow: hidden;
}

.ad-banner-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- RESPONSVIDAD --- */

/* Mobile: hasta 768px */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    nav ul {
        gap: 10px;
        flex-wrap: wrap;
    }

    nav a {
        font-size: 0.9em;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
        gap: 15px;
    }

    .user-actions .welcome {
        display: inline;
    }

    .main-content {
        flex-direction: column;
    }

    .sidebar {
        flex: none;
        width: 100%;
    }

    .events-list {
        grid-template-columns: 1fr;
    }

    .apuesta-form {
        flex-direction: column;
    }

    .apuesta-form input,
    .btn-small {
        width: 100%;
    }

    .ad-banner-mobile {
        display: block;
    }

    .ad-banner-top,
    .ad-banner-sidebar {
        height: 120px;
    }
}

/* Tablet: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .events-list {
        grid-template-columns: 1fr;
    }

    .sidebar {
        flex: 0 0 200px;
    }

    .ad-banner-sidebar {
        height: 250px;
    }
}
.cuotas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.cuota-btn {
    padding: 10px 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
}

.cuota-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.cuota-btn strong {
    display: block;
    font-size: 1.1em;
    color: #d9534f;
    margin-top: 4px;
}

.cuota-btn.local {
    text-align: left;
}

.cuota-btn.empate {
    text-align: center;
    background: #e9ecef;
}

.cuota-btn.visitante {
    text-align: right;
}
/* Estilo del modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal-contenido {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.4s ease-out;
    position: relative;
}

.modal-cerrar {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-cerrar:hover {
    color: #000;
}

.modal-icono {
    font-size: 60px;
    margin-bottom: 15px;
}

.modal-icono.gano {
    color: #28a745;
}

.modal-icono.perdio {
    color: #dc3545;
}

.modal-saldo {
    margin: 15px 0;
    font-size: 1.1em;
    color: #0a2e5c;
}

#modalBtnAceptar {
    margin-top: 10px;
    padding: 10px 20px;
    width: 100%;
}

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

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

/* Responsive */
@media (max-width: 480px) {
    .modal-contenido {
        width: 95%;
        padding: 20px;
    }
    .modal-icono {
        font-size: 50px;
    }
}
/* Modal de confirmación */
.modal-confirm {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

.modal-confirm-contenido {
    background: white;
    margin: 10% auto;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-confirm-contenido h3 {
    margin-bottom: 15px;
    color: #0a2e5c;
    text-align: center;
}

.modal-confirm-contenido .form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.modal-confirm-botones {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-confirm-botones .btn {
    flex: 1;
    padding: 10px;
    text-align: center;
}

/* Animación */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Modal de resultado */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.mostrar {
    display: block;
    opacity: 1;
}

.modal-contenido {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(-30px);
    transition: all 0.4s ease;
}

.modal.mostrar .modal-contenido {
    transform: translateY(0);
}