:root {
    --primary-color: #F45925;
    --bg-dark: #0F0F0F;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --border-glass: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary-color);
}

.hero {
    padding: 4rem 2rem;
    text-align: center;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--primary-color), transparent 85%), transparent 70%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.grid-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 2rem;
}

.ticket {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    user-select: none;
}

.ticket:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.ticket.selected {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #000 !important;
    /* Texto negro para contraste máximo en fondos brillantes */
    box-shadow: 0 0 15px var(--primary-color);
}

.ticket.sold {
    opacity: 0.2;
    background: #222;
    pointer-events: none;
    text-decoration: line-through;
    color: #444;
}

.ticket.reserved {
    background-color: #e74c3c !important;
    /* Rojo para reservas */
    border-color: #e74c3c !important;
    color: white !important;
    pointer-events: none;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.floating-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.btn-reserve {
    background-color: var(--primary-color);
    color: #000;
    /* Texto oscuro para fondos brillantes */
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-reserve:active {
    transform: scale(0.95);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1A1A1A;
    padding: 2.5rem;
    border-radius: 24px;
    max-width: 450px;
    width: 90%;
    border: 1px solid var(--border-glass);
}

.modal-header h2 {
    margin-bottom: 0.5rem;
}

.input-group {
    margin: 1.5rem 0;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    background: #252525;
    border: 1px solid var(--border-glass);
    padding: 0.8rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
}

.payment-info {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.alias-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    padding: 0.8rem;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.btn-copy {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: bold;
}

.share-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-container .share-btn {
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 800;
    color: white !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.share-wa {
    background: #25D366 !important;
}

.share-fb {
    background: #1877F2 !important;
}

.share-generic {
    background: #444 !important;
}

.btn-view-site {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-view-site:hover {
    background: var(--primary-color);
    color: white;
}

/* Responsividad mejorada */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .ticket-row,
    .sweepstake-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .action-btns {
        width: 100%;
        justify-content: space-between;
    }

    .status-badge {
        align-self: flex-start;
    }

    .floating-bar {
        width: 90%;
        bottom: 1rem;
        gap: 10px;
        padding: 1rem;
    }
}

/* Notificación de actualización PWA */
.update-toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    background: #1A1A1A;
    border: 1px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 10000;
    color: white;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.update-toast.show {
    transform: translateX(-50%) translateY(0);
}

.update-toast button {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.update-toast button:active {
    opacity: 0.8;
}