/*
 * Quiniela Premium Sports Betting - Premium Stylesheet
 * Brand color palette: Emerald Green (#10b981), Slate Deep Navy (#080c14), Blue Accents (#3b82f6)
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #090d16;
    --card-bg: rgba(20, 27, 45, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.3);
    --secondary: #3b82f6;
    --secondary-glow: rgba(59, 130, 246, 0.3);
    --accent: #8b5cf6;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gold: #f59e0b;
    --silver: #94a3b8;
    --bronze: #b45309;
}

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

body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(at 0% 0%, hsla(242, 60%, 15%, 0.5) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(271, 60%, 15%, 0.4) 0, transparent 50%),
        radial-gradient(at 50% 100%, hsla(160, 60%, 10%, 0.3) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 60px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--text);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* Header & Navigation */
header {
    background: rgba(9, 13, 22, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 10px 20px;
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--primary), #059669);
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.nav-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Hero Section */
.hero {
    padding: 80px 0 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* Pot Dashboard (Bolsa Acumulada) */
.pot-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 60px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.pot-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.pot-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.pot-amount {
    font-size: 48px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite alternate;
}

.pot-details {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

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

/* Grid layout for main page */
.main-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 968px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Panels */
.panel-header {
    padding: 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

.panel-body {
    padding: 24px;
}

/* Betting Round Cards */
.match-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 16px;
    padding: 20px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.match-card:last-child {
    margin-bottom: 0;
}

.match-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.team-logo {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.team-name {
    font-size: 14px;
    font-weight: 600;
}

.vs-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

/* Prediction Option Buttons */
.prediction-options {
    display: flex;
    gap: 10px;
}

.predict-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 12px 10px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.predict-btn span.label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

.predict-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Selection state for predictions */
.predict-btn.selected[data-val="L"] {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}
.predict-btn.selected[data-val="L"] span.label { color: var(--secondary); }

.predict-btn.selected[data-val="E"] {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}
.predict-btn.selected[data-val="E"] span.label { color: var(--accent); }

.predict-btn.selected[data-val="V"] {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}
.predict-btn.selected[data-val="V"] span.label { color: var(--primary); }

/* Sticky bet-bar summary for Mobile / bottom */
.bet-bar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--card-border);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 90;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bet-bar-container.active {
    transform: translateY(0);
}

.bet-bar-info {
    display: flex;
    flex-direction: column;
}

.bet-bar-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.bet-bar-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 110;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Brand-consistent form elements */
input[type="checkbox"], input[type="radio"] {
    accent-color: var(--primary);
}

/* Simulated Credit Card */
.credit-card-preview {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 16px;
    padding: 24px;
    position: relative;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.cc-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 6px;
}

.cc-number {
    font-family: 'Outfit', monospace;
    font-size: 18px;
    letter-spacing: 0.15em;
    color: white;
}

.cc-info {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
}

.cc-name {
    font-weight: 600;
    text-transform: uppercase;
}

/* Leaderboard */
.leaderboard-list {
    list-style: none;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
    transition: background 0.2s;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.leaderboard-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.leaderboard-rank.rank-1 { background: var(--gold); color: black; box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
.leaderboard-rank.rank-2 { background: var(--silver); color: black; }
.leaderboard-rank.rank-3 { background: var(--bronze); color: white; }

.leaderboard-details {
    display: flex;
    flex-direction: column;
}

.leaderboard-name {
    font-size: 14px;
    font-weight: 600;
}

.leaderboard-code {
    font-size: 11px;
    color: var(--text-muted);
}

.leaderboard-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.leaderboard-points {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* Beautiful Premium Printed Ticket */
.printed-ticket {
    background: #f8fafc;
    color: #0f172a;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.printed-ticket::before, .printed-ticket::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--bg);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.printed-ticket::before { left: -10px; }
.printed-ticket::after { right: -10px; }

.ticket-header {
    border-bottom: 2px dashed #cbd5e1;
    padding-bottom: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.ticket-app-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #059669, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.ticket-barcode {
    font-size: 32px;
    letter-spacing: 5px;
    margin-top: 10px;
    color: #64748b;
    user-select: none;
}

.ticket-body {
    font-size: 13px;
    line-height: 1.8;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 0;
}

.ticket-row:last-child {
    border-bottom: none;
}

.ticket-predictions-list {
    margin: 15px 0;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
}

.ticket-pred-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 4px 0;
}

.ticket-pred-badge {
    background: #0f172a;
    color: white;
    padding: 1px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* Admin Dashboard Styles */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    text-align: center;
}

.stat-val {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 8px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-badge.completed { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }

/* Score input fields for Admin */
.admin-score-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.admin-score-input {
    width: 50px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    color: var(--text);
    border-radius: 6px;
    padding: 8px;
    font-weight: bold;
}

.admin-score-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 120;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification.active {
    transform: translateX(0);
}

.notification.error {
    background: rgba(239, 68, 68, 0.95);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}
