/* =================================================================
   RESET & BASE STYLES
   ================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
}

/* =================================================================
   LAYOUT & CONTAINERS
   ================================================================= */

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 15px;
    flex-grow: 1;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.game-area {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =================================================================
   HEADER & NAVIGATION
   ================================================================= */

.header {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1e3c72;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.balance-display {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
    border: 2px solid #e9ecef;
    text-align: center;
    min-width: 200px;
}

.balance-display div {
    margin-bottom: 4px;
}

.balance-display div:last-child {
    margin-bottom: 0;
}

.api-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.api-status.connected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.api-status.disconnected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.api-status.connecting {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* =================================================================
   BUTTONS
   ================================================================= */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    width: 100%;
    margin-bottom: 8px;
}

.btn-connect {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 2px solid #28a745;
    box-shadow: 0 3px 10px rgba(40,167,69,0.3);
}

.btn-connect:hover {
    background: linear-gradient(135deg, #218838 0%, #1abc9c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40,167,69,0.4);
}

.btn-logout {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: 2px solid #dc3545;
    box-shadow: 0 3px 10px rgba(220,53,69,0.3);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220,53,69,0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 2px solid #28a745;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1abc9c 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40,167,69,0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: 2px solid #6c757d;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(108,117,125,0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: 2px solid #007bff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,123,255,0.3);
}

.btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    background: #6c757d !important;
    border-color: #6c757d !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.btn-nav {
    padding: 10px 20px;
    border: 2px solid #007bff;
    border-radius: 6px;
    background: #007bff;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
}

.btn-nav:hover:not(:disabled) {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.btn-nav.secondary {
    background: transparent;
    color: #007bff;
}

.btn-nav.secondary:hover:not(:disabled) {
    background: #007bff;
    color: white;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

/* =================================================================
   FORMS & INPUTS
   ================================================================= */

.form-group {
    margin-bottom: 1.2rem;
}

.form-label,
.form-group__label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.form-control,
.input-field {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-control:focus,
.input-field:focus {
    outline: none;
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.form-control.invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-control.valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.form-section h5 {
    margin-bottom: 12px;
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

/* =================================================================
   FILE UPLOAD
   ================================================================= */

.file-upload-area {
    border: 3px dashed #ddd;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-upload-area:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.file-upload-area.dragover {
    border-color: #28a745 !important;
    background: #f0fff4 !important;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 12px;
}

.upload-text {
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 4px;
}

.upload-subtext {
    font-size: 0.85rem;
    color: #6c757d;
}

.image-preview {
    max-width: 200px !important;
    max-height: 150px !important;
    border-radius: 6px;
    margin-top: 15px;
    display: none;
    border: 2px solid #dee2e6;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.image-preview.show {
    display: block;
}

/* =================================================================
   GAME COMPONENTS
   ================================================================= */

/* Game Selection */
.game-selection-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.game-selection-title {
    font-size: 1.6rem;
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.nfl-games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.nfl-game-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nfl-game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.nfl-game-card.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    min-height: 32px;
}

.game-status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-live {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(220,53,69,0.3);
}

.status-final {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(40,167,69,0.3);
}

.status-scheduled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(108,117,125,0.3);
}

.game-clock {
    font-size: 1rem;
    font-weight: bold;
    color: #dc3545;
    background: rgba(220,53,69,0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.live-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 15px;
    height: 15px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
    box-shadow: 0 0 10px rgba(220,53,69,0.5);
    z-index: 2;
}

.live-indicator::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid #dc3545;
    border-radius: 50%;
    animation: live-ring 2s infinite;
}

/* Game Teams */
.game-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    min-height: 100px;
    padding: 8px 0;
}

.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 80px;
}

.team-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: #666;
    background-color: #f8f9fa;
    min-width: 60px;
    min-height: 60px;
}

.team-logo[style*="background-image"]:not([style*="background-image: url('')"]) {
    color: transparent;
    font-size: 0;
    background-color: white;
}

.nfl-game-card:hover .team-logo {
    transform: scale(1.1);
    border-color: #007bff;
}

.team-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e3c72;
    text-align: center;
    min-height: 1.1rem;
}

.team-score {
    font-size: 1.6rem;
    font-weight: 900;
    color: #007bff;
    text-shadow: 0 1px 3px rgba(0,123,255,0.3);
    min-height: 1.6rem;
}

.vs-divider {
    font-size: 1.4rem;
    color: #666;
    font-weight: bold;
    margin: 0 15px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.game-details {
    text-align: center;
    padding-top: 12px;
    border-top: 2px solid #e9ecef;
    margin-top: auto;
}

.game-time {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
    text-align: center;
}

.game-venue {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    margin-bottom: 4px;
}

.game-week {
    font-size: 0.8rem;
    color: #007bff;
    font-weight: 600;
}

/* Game Title */
.game-title-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.game-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 25px;
    color: #1e3c72;
}

.team-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 15px 0;
}

.team-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 100px;
}

.team-image {
    width: 100px;
    height: 100px;
    border: 3px solid #ddd;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-image:hover {
    transform: scale(1.05);
}

.team-image[style*="background-image"]:not([style*="background-image: url('')"]) {
    color: transparent;
    font-size: 0;
}

.team-selector {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.team-selector button {
    padding: 6px 12px;
    border-radius: 5px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
}

.team-selector button:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
}

/* =================================================================
   SCOREBOARD
   ================================================================= */

.scoreboard {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.scoreboard h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.6rem;
    color: #ffc107;
}

.score-header {
    display: grid;
    grid-template-columns: 80px repeat(4, 1fr) 80px;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: bold;
    text-align: center;
    font-size: 0.9rem;
}

.score-row {
    display: grid;
    grid-template-columns: 80px repeat(4, 1fr) 80px;
    gap: 8px;
    margin-bottom: 12px;
    text-align: center;
    align-items: center;
}

.team-name-score {
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    padding: 10px 6px;
    border-radius: 6px;
    background: #333;
    color: white;
}

#away-team-score {
    background: linear-gradient(135deg, #004C54 0%, #006b76 100%) !important;
    color: #fff;
}

#home-team-score {
    background: linear-gradient(135deg, #E31837 0%, #ff1e3f 100%) !important;
    color: #fff;
}

.quarter-score {
    background: #444;
    border: 2px solid #666;
    color: white;
    padding: 12px 8px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.quarter-score.updated {
    background: #28a745;
    animation: scoreUpdate 1s ease;
}

.final-score {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    padding: 12px 8px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.3rem;
    color: white;
    border: 2px solid #0056b3;
}

/* =================================================================
   GRID SYSTEM
   ================================================================= */

.grid-container {
    background: #f8f9fa;
    border-radius: 36px;
    padding: 40px;
    border: 4px solid #e9ecef;
}

.grid-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.grid-header h4 {
    font-size: 1.3rem;
    color: #1e3c72;
}

.cost-display {
    font-weight: bold;
    color: #28a745;
    font-size: 1.2rem;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 2px solid #28a745;
}

.squares-grid-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.grid-with-horizontal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.horizontal-numbers {
    display: flex;
    gap: 2.5px;
    justify-content: center;
}

.horizontal-number {
    width: 100px;
    height: 70px;
    background: linear-gradient(135deg, #E31837 0%, #ff1e3f 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: bold;
    border: 4px solid #c61526;
    font-size: 1.1rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.vertical-numbers {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 47px;
}

.vertical-number {
    width: 35px;
    height: 50px;
    background: linear-gradient(135deg, #004C54 0%, #006b76 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: bold;
    border: 2px solid #003840;
    font-size: 1.1rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.squares-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: linear-gradient(135deg, #dee2e6 0%, #ced4da 100%);
    border-radius: 8px;
    padding: 10px;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.1);
}

.square {
    aspect-ratio: 1;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    position: relative;
    min-height: 50px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.square:hover {
    border-color: #007bff;
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 6px 12px rgba(0,123,255,0.3);
}

.square.purchased {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #1e7e34;
}

.square.yours {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #004085;
}

.square.available {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #28a745;
    color: #28a745;
}

.square.available:hover {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.square.selected {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.3);
}

.square.winner-q1 {
    outline: 5px solid #ff9800 !important;   /* thick orange */
    box-shadow: 0 0 12px #ff9800 !important;
    z-index: 5;
}

.square.winner-q2 {
    outline: 5px solid #ff0000 !important;   /* thick red */
    box-shadow: 0 0 12px #ff0000 !important; /* red glow */
    z-index: 5;
}

.square.winner-q3 {
    outline: 5px solid #2196f3 !important;   /* thick blue */
    box-shadow: 0 0 12px #2196f3 !important;
    z-index: 5;
}

.square.winner-q4 {
    outline: 5px solid #9c27b0 !important;   /* thick purple */
    box-shadow: 0 0 12px #9c27b0 !important;
    z-index: 5;
}

.square.winner-final {
    outline: 7px solid #ffd700 !important;   /* thick gold */
    box-shadow: 0 0 18px #ffd700 !important; /* strong glow */
    z-index: 6;
}

/* =================================================================
   PANELS & STATS
   ================================================================= */

.purchase-panel, 
.game-stats {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.panel-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1e3c72;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 2px solid #dee2e6;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
    font-weight: 500;
}

/* =================================================================
   BANNER COMPONENTS
   ================================================================= */

.banner-advertisement-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.banner-advertisement-section h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 20px;
    text-align: center;
}

.bottom-banners {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
}

.banner-ad {
    width: 100%;
    min-height: 150px !important;
    height: auto !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    color: #666;
}

.banner-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.banner-ad.available:hover {
    transform: translateY(-2px) scale(1.02);
}

.banner-ad.active {
    position: relative;
    background: none;
    border: 2px solid #28a745;
    padding: 0;
    overflow: hidden;
}

.banner-ad.active:hover {
    transform: scale(1.02);
}

.banner-purchase-corner {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    background: rgba(0, 123, 255, 0.95) !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 0.7rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: all 0.2s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.banner-purchase-corner:hover {
    background: rgba(0, 123, 255, 1) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.3) !important;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 8px;
    border-radius: 0 0 6px 6px;
}

.banner-title {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.rotation-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.banner-stats {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* =================================================================
   MODALS
   ================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.banner-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 2px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    gap: 12px;
}

.modal-step {
    display: none;
}

.modal-step.active {
    display: block !important;
}

.banner-form {
    display: none;
}

.banner-form.show {
    display: block !important;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 8px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dee2e6;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: #007bff;
    transform: scale(1.2);
}

.step-dot.completed {
    background: #28a745;
}

.step {
    display: none;
}

.step.active {
    display: block !important;
}

.modal-navigation {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.pricing-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.pricing-card {
    border: 3px solid #e9ecef;
    border-radius: 8px;
    padding: 18px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pricing-card:hover {
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.pricing-card.selected {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.pricing-duration {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.pricing-cost {
    font-size: 1rem;
    color: #667eea;
    font-weight: 600;
}

.banner-type-selection {
    margin-bottom: 25px;
}

.type-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.type-option {
    border: 3px solid #e9ecef;
    border-radius: 8px;
    padding: 18px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.type-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.2);
}

.type-option.selected {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.type-icon {
    font-size: 2rem !important;
    margin-bottom: 12px;
    color: #667eea;
}

.type-option.selected .type-icon {
    color: #28a745 !important;
}

.type-title {
    font-weight: bold;
    margin-bottom: 4px;
}

.type-cost {
    color: #dc3545;
    font-weight: 600;
    font-size: 0.85rem;
}

.payment-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.payment-method {
    margin-bottom: 12px;
}

.total-cost {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
    text-align: center;
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* =================================================================
   AVATAR & TOKEN COMPONENTS
   ================================================================= */

#custom-avatar-section {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

#avatar-preview img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    margin-top: 5px;
    object-fit: cover;
    border: 1px solid #aaa;
}

#unlockAvatarBtn, 
#avatar-upload-form button[type="submit"] {
    padding: 8px 20px;
    font-size: 1rem;
    border-radius: 5px;
    background: #19be6d;
    color: #fff;
    border: none;
    margin: 10px 0 0 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.18s;
}

#unlockAvatarBtn:disabled {
    background: #ccc;
    color: #fff;
}

#avatar-upload-form {
    margin-top: 10px;
}

#avatar-unlock-status {
    color: #256900;
    margin-top: 8px;
    font-weight: 500;
}

.avatar-message {
    padding: 8px;
    margin: 8px 0;
    border-radius: 4px;
    font-weight: bold;
}

.avatar-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.avatar-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.token-info-card {
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 15px;
}

.token-info-card img {
    border-radius: 6px;
    margin-bottom: 8px;
}

/* =================================================================
   LOADING & MESSAGES
   ================================================================= */

.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
    color: #6c757d;
    background: rgba(248, 249, 250, 0.95);
    border-radius: 8px;
    margin: 15px 0;
}

.loading.show {
    display: flex !important;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.no-games, .error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 15px;
    border-radius: 12px;
    font-size: 1.1rem;
}

.no-games {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    color: #6c757d;
}

.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    color: #721c24;
}

.error-message, .success-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
    border-left: 4px solid;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
    border-left-color: #dc3545;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-color: #28a745;
    border-left-color: #28a745;
}

/* =================================================================
   NOTIFICATIONS
   ================================================================= */

.notification {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success { background: #28a745; }
.notification.error { background: #dc3545; }
.notification.warning { background: #ffc107; color: #856404; }
.notification.info { background: #17a2b8; }

/* =================================================================
   FOOTER
   ================================================================= */

.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 30px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
}

.footer-section h4 {
    color: #ffc107;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.footer-section p, .footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #ffc107;
}

.footer-bottom {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #333;
    color: #999;
    font-size: 0.85rem;
}

.responsible-gaming {
    font-size: 0.85rem;
    color: #666;
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.responsible-gaming a {
    color: #0066cc;
    text-decoration: underline;
}

/* =================================================================
   UTILITY CLASSES
   ================================================================= */

.deposit {
    color: #10b981;
}

.withdrawal {
    color: #ef4444;
}

.status-indicator {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 8px;
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-completed {
    background: #d1fae5;
    color: #059669;
}

.status-failed {
    background: #fee2e2;
    color: #dc2626;
}

/* =================================================================
   ANIMATIONS
   ================================================================= */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes scoreUpdate {
    0% { background: #ffc107; transform: scale(1.1); }
    100% { background: #28a745; transform: scale(1); }
}

@keyframes live-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes pulse-live {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* =================================================================
   RESPONSIVE DESIGN - TABLET & DESKTOP
   ================================================================= */

@media (min-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .header {
        flex-direction: row;
        text-align: left;
        padding: 25px;
    }
    
    .header-center {
        flex-direction: row;
        gap: 20px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .user-info {
        flex-direction: row;
    }
    
    .btn {
        width: auto;
        margin-bottom: 0;
    }
    
    .main-content {
        display: grid;
        grid-template-columns: 1fr 350px;
        gap: 25px;
    }
    
    .sidebar {
        flex-direction: column;
    }
    
    .game-area {
        padding: 25px;
    }
    
    .team-images {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .team-logo {
        width: 80px;
        height: 80px;
        font-size: 0.9rem;
    }
    
    .team-image {
        width: 120px;
        height: 120px;
    }
    
    .team-name {
        font-size: 1.4rem;
    }
    
    .team-score {
        font-size: 2.2rem;
    }
    
    .nfl-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
    
    .vs-divider {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
        margin: 0 20px;
    }
    
    .game-teams {
        min-height: 140px;
    }
    
    .squares-grid-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
    }
    
    .vertical-numbers {
        margin-top: 76px;
    }
    
    .vertical-number {
        width: 45px;
        height: 70px;
        font-size: 1.4rem;
    }
    
    .horizontal-number {
        width: 70px;
        height: 45px;
        font-size: 1.4rem;
    }
    
    .square {
        min-height: 70px;
        font-size: 1rem;
    }
    
    .square:hover {
        transform: scale(1.08);
    }
    
    .score-header, .score-row {
        grid-template-columns: 100px repeat(4, 1fr) 100px;
        gap: 12px;
    }
    
    .quarter-score, .final-score {
        padding: 15px 10px;
        font-size: 1.4rem;
    }
    
    .final-score {
        font-size: 1.5rem;
    }
    
    .grid-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .grid-header h4 {
        font-size: 1.5rem;
    }
    
    .cost-display {
        font-size: 1.3rem;
    }
    
    .bottom-banners {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 25px;
        padding: 25px;
    }
    
    .banner-ad {
        min-height: 180px !important;
    }
    
    .modal-navigation {
        flex-direction: row;
        justify-content: space-between;
        gap: 15px;
    }
    
    .btn-nav {
        width: auto;
        min-width: 100px;
    }
    
    .modal-footer {
        gap: 15px;
    }
    
    .pricing-options {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .type-options {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
        text-align: left;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 25px;
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    .game-selection-title {
        font-size: 1.8rem;
    }
    
    .scoreboard h3 {
        font-size: 1.8rem;
    }
    
    .banner-advertisement-section h1 {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
  .squares-grid-wrapper {
    flex-direction: column-reverse !important;
    align-items: center;
  }

  .vertical-numbers {
    margin-top: 0 !important;
    flex-direction: row;
    justify-content: center;
    gap: 2px;
  }

  .vertical-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .horizontal-numbers {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }

  .horizontal-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .squares-grid {
    grid-template-columns: repeat(5, 1fr); /* Adjust to fit screen */
  }
}

/* Mobile Utilities */
.hide-sm { display: none !important; }
.show-sm { display: block !important; }

/* Default to hidden, show only on larger screens */
.grid-md { display: none; }

/* Show on medium+ screens */
@media (min-width: 768px) {
  .hide-sm { display: block !important; }
  .show-sm { display: none !important; }
  .grid-md { display: grid !important; }
}

/* =================================================================
   TEAM SELECTION - ADD THIS TO THE END OF YOUR styles.css
   ================================================================= */

.team-selection-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
}

.team-selection-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.team-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
    max-width: 1000px;
    margin: 0 auto;
}

.team-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.team-btn:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.team-btn.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40,167,69,0.3);
    transform: translateY(-1px);
}

.team-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .team-buttons-grid {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 6px;
    }
    
    .team-btn {
        padding: 10px 6px;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .team-selection-container {
        padding: 15px;
    }
  .squares-grid-wrapper {
    display: grid !important;
    grid-template-columns: auto 1fr;
    max-width: 98vw;
    min-width: 220px;
    gap: 4px;
  }
  .vertical-numbers {
    display: grid !important;
    grid-template-rows: repeat(10, 1fr);
    min-width: 20px;
    max-width: 20px;
    margin-right: 4px;
    margin-top: -60px; /* Adjusts to vertically align with grid */
    height: -40%;
    max-height: calc(33px * 8 + 10px);
    font-size: 0.95em;
  }
  .horizontal-numbers {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    min-width: 26px;
    font-size: 0.95em;
    height: 29px;
  }
  .squares-grid {
    display: grid;  
    min-width: 260px;
    max-width: 99vw;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
  }
  .square, .horizontal-number, .vertical-number {
    min-width: 26px;
    min-height: 26px;
    font-size: 0.85rem;
  }
}

