/* ========================================
   QUINIELA STYLES - Mobile First Design
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&family=Anton+SC&display=swap');

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --success-color: #00d084;
    --warning-color: #ffa500;
    --danger-color: #ff4757;
    --text-light: #ffffff;
    --text-dark: #2d3436;
    --bg-light: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== NAVBAR BROADCAST STYLE ========== */
.navbar-broadcast {
    background: linear-gradient(to right, #1a1a2e, #16213e);
    color: var(--text-light);
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--highlight-color);
}

.navbar-brand img {
    filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.5));
    transition: var(--transition);
}

.navbar-brand img:hover {
    filter: drop-shadow(0 0 15px rgba(233, 69, 96, 0.8));
    transform: scale(1.05);
}

.navbar-title {
    font-family: 'Anton SC', sans-serif;
    font-size: clamp(1.2rem, 4vw, 2rem);
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== SCOREBOARD HEADER ========== */
.scoreboard-header {
    background: linear-gradient(to bottom, #2d3436, #000000);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.team-section {
    position: relative;
    height: 100px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.team-section:hover {
    transform: scale(1.02);
}

.team-logo {
    position: absolute;
    top: -35px;
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    animation: float 3s ease-in-out infinite;
}

.team-logo.home {
    left: 40px;
}

.team-logo.away {
    right: 40px;
}

.team-name {
    font-family: 'Anton SC', sans-serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--text-light);
    opacity: 0.8;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: 3px;
}

.team-name.home {
    position: absolute;
    left: 200px;
}

.team-name.away {
    position: absolute;
    right: 200px;
}

.team-score {
    font-family: 'Anton SC', sans-serif;
    font-size: clamp(2.5rem, 7vw, 4rem);
    color: var(--text-light);
    opacity: 0.9;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8);
    font-weight: bold;
}

.team-score.home {
    position: absolute;
    left: 380px;
}

.team-score.away {
    position: absolute;
    right: 380px;
}

.vs-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

.vs-badge img {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 20px rgba(233, 69, 96, 0.8));
}

.game-clock {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
}

.clock-display {
    font-family: 'Anton SC', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: var(--text-dark);
    opacity: 0.8;
    letter-spacing: 2px;
}

.clock-quarter {
    font-size: 80%;
    vertical-align: super;
}

/* ========== SPORT SELECTOR ========== */
.sport-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    flex-wrap: wrap;
}

.sport-btn {
    padding: 12px 24px;
    border: 2px solid var(--text-light);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.sport-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sport-btn.active {
    background: var(--highlight-color);
    border-color: var(--highlight-color);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

/* ========== GAME SELECTOR ========== */
.game-selector {
    max-width: 600px;
    margin: 0 auto 20px;
    padding: 0 15px;
}

.game-dropdown {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
}

.game-dropdown:hover {
    background: var(--text-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ========== PREDICTION FORM ========== */
.prediction-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 15px 20px;
}

.prediction-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease-out;
}

.prediction-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.score-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.team-input-group {
    text-align: center;
}

.team-input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.score-input {
    width: 100%;
    padding: 15px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    border: 3px solid var(--accent-color);
    border-radius: 15px;
    background: var(--bg-light);
    transition: var(--transition);
}

.score-input:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
    transform: scale(1.05);
}

.vs-divider {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    opacity: 0.5;
}

.btn-submit-prediction {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--highlight-color), #ff6b6b);
    color: var(--text-light);
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-submit-prediction:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit-prediction:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prediction-count {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-dark);
    opacity: 0.7;
}

/* ========== RANKING TABLE ========== */
.ranking-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px;
}

.ranking-header {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 20px;
}

.ranking-header h2 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.ranking-table-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
}

.ranking-table th {
    padding: 15px 10px;
    font-weight: 600;
    text-align: left;
    font-size: 0.9rem;
}

.ranking-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.ranking-table tbody tr:hover {
    background: rgba(233, 69, 96, 0.05);
}

.ranking-table td {
    padding: 15px 10px;
    font-size: 0.95rem;
}

.rank-position {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.rank-position.first {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-position.second {
    color: #c0c0c0;
}

.rank-position.third {
    color: #cd7f32;
}

.player-name {
    font-weight: 600;
    color: var(--text-dark);
}

.player-name.eliminated {
    text-decoration: line-through;
    opacity: 0.4;
    color: var(--danger-color);
}

.prediction-score {
    font-weight: 600;
    color: var(--accent-color);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-exact {
    background: var(--success-color);
    color: var(--text-light);
}

.badge-winner {
    background: #48dbfb;
    color: var(--text-light);
}

.badge-paid {
    background: var(--success-color);
    color: var(--text-light);
}

.badge-unpaid {
    background: var(--warning-color);
    color: var(--text-light);
}

.badge-eliminated {
    background: var(--danger-color);
    color: var(--text-light);
}

/* ========== NOTIFICATION TOAST ========== */
.toast-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    max-width: 350px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: var(--text-light);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification.show {
    right: 20px;
    animation: shake 0.5s ease-in-out;
}

.toast-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.toast-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.toast-message {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--text-light);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s ease-out;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

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

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--highlight-color), #ff6b6b);
    color: var(--text-light);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--text-dark);
    color: var(--text-light);
}

/* ========== LOGOUT BUTTON ========== */
.logout-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: rgba(255, 71, 87, 0.9);
    color: var(--text-light);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 1000;
}

.logout-btn:hover {
    background: var(--danger-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========== ANIMATIONS ========== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .team-logo {
        width: 100px;
        height: 100px;
        top: -25px;
    }
    
    .team-logo.home { left: 20px; }
    .team-logo.away { right: 20px; }
    
    .team-name {
        font-size: 1.5rem;
    }
    
    .team-name.home { left: 130px; }
    .team-name.away { right: 130px; }
    
    .team-score {
        font-size: 2rem;
    }
    
    .team-score.home { left: 250px; }
    .team-score.away { right: 250px; }
    
    .vs-badge img {
        width: 80px;
        height: 80px;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 10px 5px;
        font-size: 0.85rem;
    }
    
    .toast-notification {
        max-width: 90%;
        right: -100%;
    }
    
    .toast-notification.show {
        right: 5%;
    }
}

@media (max-width: 480px) {
    .team-section {
        height: 80px;
    }
    
    .team-logo {
        width: 80px;
        height: 80px;
    }
    
    .team-name {
        font-size: 1.2rem;
    }
    
    .team-name.home { left: 100px; }
    .team-name.away { right: 100px; }
    
    .team-score {
        font-size: 1.5rem;
    }
    
    .team-score.home { left: 180px; }
    .team-score.away { right: 180px; }
    
    .score-input {
        font-size: 1.5rem;
        padding: 10px;
    }
}

/* ========== LOADING SPINNER ========== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}
