/* ==========================================
   CupTracker 2026 - Premium CSS Design System
   ========================================== */

/* Color Tokens & Variables */
:root {
    --bg-primary: #03030c;
    --bg-secondary: rgba(8, 8, 20, 0.75);
    --bg-card: rgba(14, 16, 38, 0.5);
    --bg-card-hover: rgba(22, 26, 60, 0.65);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 255, 135, 0.2);
    --border-focus: rgba(255, 183, 0, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --accent: #ffb700; /* Oro Trofeo */
    --accent-rgb: 255, 183, 0;
    --accent-hover: #ff9f00;
    --accent-glow: rgba(255, 183, 0, 0.25);
    
    --success: #00ff87; /* Verde Césped Neón */
    --success-glow: rgba(0, 255, 135, 0.3);
    --warning: #ffb700;
    --error: #ff3838;
    --live: #ff3838;
    --live-glow: rgba(255, 56, 56, 0.4);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 25px rgba(0, 255, 135, 0.08);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        linear-gradient(rgba(3, 3, 12, 0.8), rgba(3, 3, 12, 0.88)),
        url('stadium_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 176, 65, 0.4);
}

/* Typography Selection */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* App Header Styling */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(4, 4, 14, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    box-shadow: var(--shadow-sm);
}

.header-main {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 183, 0, 0.3));
}

.logo-text h1 {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.accent-year {
    color: var(--accent);
    text-shadow: 0 0 12px var(--accent-glow);
}

.tagline {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Network Indicator (Puntito Verde) */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 0.85rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-normal);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
    transition: var(--transition-normal);
}

/* Pulsing states for network indicator */
.status-indicator.updating .status-dot {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: statusPulse 1s infinite alternate;
}

.status-indicator.offline .status-dot {
    background-color: var(--text-muted);
    box-shadow: none;
    animation: none;
}

.status-indicator.offline {
    border-color: rgba(231, 76, 60, 0.2);
    background: rgba(231, 76, 60, 0.03);
    color: var(--error);
}

.status-label {
    color: var(--text-secondary);
}

.status-indicator.offline .status-label {
    color: var(--error);
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.3); opacity: 1; }
}

.status-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.info-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.info-value {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.info-timezone {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: block;
    margin-top: 1px;
}

/* Alertas & Button Styles */
.btn-alert {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.btn-alert:hover {
    background: rgba(245, 176, 65, 0.08);
    border-color: var(--border-accent);
    color: var(--accent);
}

.btn-alert.enabled {
    background: rgba(46, 204, 113, 0.08);
    border-color: rgba(46, 204, 113, 0.3);
    color: var(--success);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.1);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 2rem;
}

/* Column Cards (Glassmorphism) */
.col-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 850px;
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.col-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.col-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.text-accent {
    color: var(--accent);
}

.badge {
    background: rgba(245, 176, 65, 0.15);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(245, 176, 65, 0.3);
    display: inline-block;
}

/* Tournament progress layout */
.tournament-progress {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-grow: 1;
    justify-content: flex-end;
    min-width: 160px;
}

.progress-bar-track {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #00f5ff 100%);
    border-radius: 50px;
    box-shadow: 0 0 8px var(--success-glow);
    transition: width var(--transition-normal);
}

.section-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -0.75rem;
    margin-bottom: 1.25rem;
}

/* Scroll Containers */
.scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
    position: relative;
}

/* Loading Spinners */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    gap: 0.75rem;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--accent);
}

.loading-spinner p {
    font-size: 0.85rem;
}

/* Filters & Search - Col 1 */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem 0.6rem 2.25rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--border-focus);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(245, 176, 65, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.tab-btn.active {
    background: rgba(245, 176, 65, 0.12);
    border-color: var(--accent);
    color: var(--accent);
}

/* Pulsing live dot in filters */
.pulse-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--live);
    box-shadow: 0 0 8px var(--live);
    animation: livePulse 1s infinite alternate;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.3); opacity: 1; }
}

.select-group-wrapper select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.select-group-wrapper select:focus {
    border-color: var(--border-focus);
}

.select-group-wrapper select option {
    background: #111124;
    color: var(--text-primary);
}

/* Match Cards */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.match-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.match-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.match-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.match-stage {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.match-stadium {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Live card borders & pulse background */
.match-card.live-match {
    border-color: rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.02);
}

.match-card.live-match:hover {
    background: rgba(231, 76, 60, 0.05);
}

.match-card.live-match::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--live);
}

/* Match Team Info */
.match-team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.4rem 0;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.team-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
}

.team-flag-placeholder {
    width: 24px;
    height: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: var(--text-muted);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.team-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.team-name.winner-team {
    color: #fff;
    font-weight: 700;
}

.team-score {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-secondary);
    width: 24px;
    text-align: right;
}

.team-score.winner-score {
    color: var(--accent);
}

.live-match .team-score {
    color: var(--live);
}

.live-badge {
    background: var(--live);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    animation: liveBadgeFlash 1s infinite alternate;
}

@keyframes liveBadgeFlash {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Match Scorers */
.match-scorers {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.03);
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.scorer-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.scorer-line i {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* Empty Match State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--border-focus);
}

/* COLUMN 2: GROUPS - Tables */
.groups-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.group-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.group-card:hover, .group-card.selected-group {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
}

.group-card.selected-group {
    box-shadow: 0 0 15px rgba(245, 176, 65, 0.08);
}

.group-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-name::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.group-card:hover .group-name::after, .group-card.selected-group .group-name::after {
    color: var(--accent);
    transform: translateX(2px);
}

/* Standings Table styling */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    text-align: left;
}

.standings-table th {
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.35rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.standings-table td {
    padding: 0.45rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
}

.standings-table tr:last-child td {
    border-bottom: none;
}

.team-pos {
    width: 16px;
    font-weight: 700;
    color: var(--text-muted);
}

/* Highlight qualifying spots */
.standings-table tr:nth-child(1) .team-pos,
.standings-table tr:nth-child(2) .team-pos {
    color: var(--accent);
}

.standings-table tr:nth-child(3) .team-pos {
    color: var(--success);
}

.table-team-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-team-name span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.num-col {
    text-align: center;
    width: 22px;
}

.pts-col {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

/* COLUMN 3: NEWS - Feed */
.news-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.news-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.news-lang-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.15rem;
    border-radius: 20px;
    gap: 0.1rem;
}

.lang-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-tab-btn:hover {
    color: var(--text-primary);
}

.lang-tab-btn.active {
    background: var(--accent);
    color: #03030c;
    box-shadow: 0 0 10px var(--accent-glow);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
}

.news-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 135, 0.05);
}

.news-img-wrapper {
    width: 100%;
    height: 140px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-source {
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.news-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.news-card:hover h3 {
    color: var(--accent);
}

.news-snippet {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* News Auto-refresh controls */
.news-refresh-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-ring-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.refresh-countdown {
    position: absolute;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.btn-refresh {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.2rem;
    transition: var(--transition-fast);
}

.btn-refresh:hover {
    color: var(--accent);
    transform: rotate(30deg);
}

/* ====================================
   BRACKETS SECTION - Tree Visualization
   ==================================== */
.bracket-card {
    grid-column: span 2;
    height: auto;
    min-height: 500px;
}

.bracket-header {
    flex-wrap: wrap;
    gap: 1.25rem;
}

.bracket-controls {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.25rem;
    border-radius: 8px;
    gap: 0.2rem;
}

.bracket-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.bracket-tab.active {
    background: rgba(245, 176, 65, 0.15);
    color: var(--accent);
}

.bracket-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 1.5rem 0.5rem;
    cursor: grab;
}

.bracket-wrapper:active {
    cursor: grabbing;
}

.bracket-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4rem; /* Spacing between rounds */
    min-width: max-content;
    position: relative;
    padding: 1rem 0;
}

/* Rounds Column */
.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    min-height: 580px; /* Minimum height to space matches */
    gap: 1.25rem;
}

.bracket-round-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    background: rgba(245, 176, 65, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(245, 176, 65, 0.1);
    white-space: nowrap;
}

.bracket-round-matches {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-grow: 1;
    gap: 1rem;
    width: 250px; /* Uniform width of match cards in brackets */
}

/* Bracket Match Card styling */
.bracket-match {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
    font-size: 0.75rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.bracket-match:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 135, 0.06);
}

.bracket-match-id {
    position: absolute;
    top: -8px;
    left: 8px;
    background: #03030c;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--accent);
}

.bracket-match-meta {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.35rem;
    display: flex;
    justify-content: space-between;
}

.bracket-match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.bracket-team-name {
    font-weight: 600;
    color: var(--text-secondary);
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bracket-team-name.placeholder {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
}

.bracket-team-name.winner {
    color: #fff;
    font-weight: 700;
}

.bracket-score {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-muted);
}

.bracket-score.winner {
    color: var(--accent);
}

/* Connecting SVG overlay paths (Dynamic paths can be simulated via CSS connectors for simplicity) */
/* CSS connectors for traditional layouts */
.bracket-round-matches {
    position: relative;
}

/* ======================================
   Floating Buy Me a Coffee (FAB) Button
   ====================================== */
.floating-coffee-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
    color: #03030c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 255, 135, 0.25);
    z-index: 99;
    cursor: pointer;
    transition: var(--transition-normal);
}

.floating-coffee-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 255, 135, 0.45);
}

.floating-coffee-btn:hover i {
    animation: coffeeSteam 0.5s ease-in-out infinite alternate;
}

@keyframes coffeeSteam {
    0% { transform: translateY(0); }
    100% { transform: translateY(-2px); }
}

.coffee-tooltip {
    position: absolute;
    right: 70px;
    background: #0b0b18;
    border: 1px solid var(--border-accent);
    color: var(--accent);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.floating-coffee-btn:hover .coffee-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* ==================================
   Toast Notification Container
   ================================== */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: rgba(10, 10, 24, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    min-width: 280px;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transform: translateY(-20px);
    opacity: 0;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.toast-goal {
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.15);
}

.toast.toast-goal i {
    color: var(--success);
}

.toast.toast-news {
    border-color: rgba(245, 176, 65, 0.4);
    box-shadow: 0 4px 20px rgba(245, 176, 65, 0.15);
}

.toast.toast-news i {
    color: var(--accent);
}

.toast-icon {
    font-size: 1.15rem;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.15rem;
}

.toast-body {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================================
   Footer (Legal Disclaimer)
   ================================== */
.app-footer {
    background: #020207;
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-version {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-left: 0.25rem;
}

.footer-logo i {
    color: var(--accent);
}

.disclaimer {
    font-size: 0.72rem;
    color: var(--text-muted);
    max-width: 900px;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 1.5rem;
}

.copyright {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* ==================================
   Responsive Grid Queries
   ================================== */
.match-broadcasters {
    display: flex;
    align-items: center;
    margin-top: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.broadcaster-title {
    font-weight: 700;
    margin-right: 0.4rem;
}

.broadcaster-badge {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    margin-right: 0.35rem;
    transition: var(--transition-fast);
}

.broadcaster-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    filter: brightness(1.2);
}

.broadcaster-badge.vix {
    background: linear-gradient(135deg, #ff7e15 0%, #e74c3c 100%);
    color: #fff;
    border: 1px solid rgba(255, 126, 21, 0.2);
}

.broadcaster-badge.azteca {
    background: #111124;
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.broadcaster-badge.peacock {
    background: #000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.broadcaster-badge.fox {
    background: #1e3799;
    color: #fff;
    border: 1px solid rgba(30, 55, 153, 0.2);
}

/* Mobile Tab Bar styles */
.mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(4, 4, 14, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mobile-tab-btn i {
    font-size: 1.15rem;
}

.mobile-tab-btn.active {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 1100px;
    }
}

@media (max-width: 800px) {
    html, body {
        overflow: hidden;
        height: 100%;
        height: 100dvh;
        width: 100%;
        position: fixed;
    }

    body {
        padding-bottom: 60px; /* Space for mobile navigation bar */
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 0;
        margin: 0;
        gap: 0;
        height: calc(100dvh - 85px);
        overflow: hidden;
    }

    .app-header {
        padding: 0.75rem 1rem;
    }

    .header-main {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        width: 100%;
    }

    .logo-text h1 {
        font-size: 1.3rem;
    }

    .tagline {
        display: none;
    }

    .header-status {
        gap: 0.75rem;
        align-items: center;
    }

    .btn-alert {
        padding: 0;
        gap: 0;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        justify-content: center;
        flex-shrink: 0;
    }

    .btn-alert span {
        display: none;
    }

    .btn-alert i {
        font-size: 1.1rem;
        margin: 0;
    }

    .status-info, #network-indicator {
        display: none; /* Hide to save space on mobile header */
    }

    .col-card {
        display: none; /* Hide all columns by default */
        height: calc(100dvh - 125px); /* Full height minus header and tab-bar */
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 1rem;
        margin: 0;
        box-shadow: none;
        flex-direction: column;
    }

    .col-card.active-mobile-col {
        display: flex; /* Show only active column */
        animation: mobileColFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    #bracket-section {
        height: calc(100dvh - 125px);
        overflow: auto;
    }

    .bracket-card {
        grid-column: span 1;
    }

    .mobile-tab-bar {
        display: flex; /* Show tab bar on mobile */
    }

    .floating-coffee-btn {
        bottom: 5.25rem; /* Shift FAB up so it doesn't overlap tab-bar */
        right: 1.25rem;
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }
}

/* ==========================================
   Desktop Tab Navigation & View Switcher
   ========================================== */
.desktop-nav-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.2rem;
    border-radius: 30px;
    gap: 0.15rem;
}

.desktop-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.desktop-tab-btn:hover {
    color: var(--text-primary);
}

.desktop-tab-btn.active {
    background: var(--accent);
    color: #03030c;
    box-shadow: 0 0 10px var(--accent-glow);
}

@media (min-width: 801px) {
    /* Hide bracket card section by default on desktop */
    #bracket-section {
        display: none;
    }
    
    /* When viewing brackets: hide dashboard columns and show brackets spanning full width */
    body.view-brackets #matches-col,
    body.view-brackets #groups-col,
    body.view-brackets #news-col {
        display: none !important;
    }
    
    body.view-brackets #bracket-section {
        display: flex !important;
    }
}

/* Hide desktop switcher on mobile */
@media (max-width: 800px) {
    .desktop-nav-tabs {
        display: none;
    }
}

/* ==========================================
   Stadium LED Ribbon Ticker Bar (News Ticker)
   ========================================== */
.led-ticker-bar {
    display: flex;
    align-items: center;
    background: #020207;
    border-top: 1px solid rgba(0, 245, 255, 0.15);
    border-bottom: 1px solid rgba(0, 245, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.05);
    height: 40px;
    position: sticky;
    top: 73px; /* Stays fixed just below the sticky header */
    z-index: 90;
    overflow: hidden;
}

.ticker-label {
    background: linear-gradient(135deg, #005f73 0%, #0a9396 100%);
    color: #00f5ff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-right: 2px solid #00f5ff;
    text-shadow: 0 0 5px rgba(0, 245, 255, 0.5);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    z-index: 10;
}

.ticker-lang-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    align-items: center;
    padding: 0 0.5rem;
    gap: 0.2rem;
    z-index: 10;
}

.ticker-lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ticker-lang-btn:hover {
    color: #fff;
    border-color: rgba(0, 245, 255, 0.3);
}

.ticker-lang-btn.active {
    background: #00f5ff;
    color: #020207;
    border-color: #00f5ff;
    font-weight: 800;
    box-shadow: 0 0 8px rgba(0, 245, 255, 0.4);
}

.ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ticker-move 120s linear infinite;
}

.ticker:hover {
    animation-play-state: paused;
}

@keyframes ticker-move {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: #00f5ff;
    text-shadow: 0 0 5px rgba(0, 245, 255, 0.3);
}

.ticker-source {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.72rem;
    text-shadow: 0 0 5px rgba(255, 183, 0, 0.3);
}

.ticker-link {
    color: #00f5ff;
    text-decoration: none;
    transition: var(--transition-fast);
}

.ticker-link:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 15px rgba(0, 245, 255, 0.8);
}

.ticker-separator {
    color: var(--accent);
    font-size: 0.6rem;
    margin: 0 2rem;
    text-shadow: 0 0 5px rgba(255, 183, 0, 0.4);
    animation: spinSlow 8s linear infinite;
    display: inline-block;
}

@keyframes spinSlow {
    100% { transform: rotate(360deg); }
}

.ticker-refresh-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    background: #020207;
    z-index: 10;
}

.ticker-countdown {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
}

.ticker-refresh-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem;
    transition: var(--transition-fast);
}

.ticker-refresh-btn:hover {
    color: #00f5ff;
    transform: rotate(30deg);
}

/* Adjustments for mobile viewports */
@media (max-width: 800px) {
    .led-ticker-bar {
        top: 48px; /* sits under the smaller mobile header */
        height: 35px;
    }
    .ticker-item {
        font-size: 0.75rem;
    }
    .ticker-label {
        font-size: 0.65rem;
        padding: 0 0.5rem;
    }
    .ticker-separator {
        margin: 0 1rem;
    }
}

/* ====================================
   CHAMPION OVERLAY (POST-TOURNAMENT VIEW)
   ==================================== */
.champion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #03030c;
    background-image: 
        radial-gradient(circle at center, rgba(245, 176, 65, 0.12) 0%, rgba(3, 3, 12, 0.98) 70%),
        url('stadium_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.champion-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    width: 90%;
    text-align: center;
    background: rgba(14, 16, 38, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(245, 176, 65, 0.25);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(245, 176, 65, 0.15);
    animation: championCardIntro 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes championCardIntro {
    0% { transform: scale(0.8) translateY(30px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.trophy-glow-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.champion-trophy {
    font-size: 5rem;
    background: linear-gradient(135deg, #ffd700 0%, #f5b041 50%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(245, 176, 65, 0.6));
    animation: trophyPulse 2s infinite alternate;
}

@keyframes trophyPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(245, 176, 65, 0.5)); }
    100% { transform: scale(1.08); filter: drop-shadow(0 0 30px rgba(245, 176, 65, 0.8)); }
}

.champion-subtitle {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
}

.champion-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.champion-winner-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.02);
}

.champion-flag-wrapper {
    width: 120px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.champion-flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.champion-name {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.01em;
}

.champion-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.btn-dismiss-champion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.btn-dismiss-champion:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #03030c;
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

/* CSS-based Confetti Animation */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 20px;
    background: #ffd700;
    top: -20px;
    opacity: 0.85;
    border-radius: 2px;
    animation: confettiFall 4s linear infinite;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(105vh) rotate(720deg); }
}

/* Mobile column fade/slide transition */
@keyframes mobileColFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop section fade/zoom transition */
@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: scale(0.99);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (min-width: 801px) {
    body.view-brackets #bracket-section {
        display: flex !important;
        animation: sectionFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    body:not(.view-brackets) #matches-col,
    body:not(.view-brackets) #groups-col {
        animation: sectionFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
}

/* ==========================================
   PWA Installation Banner & Tutorial Modal
   ========================================== */
.pwa-install-banner {
    position: fixed;
    bottom: 5.5rem; /* sits just above mobile tab bar */
    left: 1rem;
    right: 1rem;
    background: rgba(10, 10, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    z-index: 998;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUpPwa 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.pwa-banner-icon {
    font-size: 1.5rem;
    color: #00f5ff;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.pwa-banner-text {
    flex-grow: 1;
}

.pwa-banner-text h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.15rem 0;
    font-family: var(--font-heading);
}

.pwa-banner-text p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pwa-primary {
    background: var(--accent);
    color: #03030c;
    border: none;
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: var(--transition-fast);
}

.btn-pwa-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-pwa-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition-fast);
}

.btn-pwa-close:hover {
    color: #fff;
}

/* Tutorial Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(2, 2, 8, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 1.5rem;
    animation: fadeInModal 0.25s ease forwards;
}

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

.modal-card {
    background: rgba(12, 12, 32, 0.95);
    border: 1px solid rgba(0, 245, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 245, 255, 0.05);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: popModal 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popModal {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.pwa-instructions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pwa-instruction-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
}

.pwa-instruction-tab h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pwa-instruction-tab h3 i {
    color: #00f5ff;
}

.pwa-instruction-tab ol {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.pwa-instruction-tab li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.pwa-instruction-tab li:last-child {
    margin-bottom: 0;
}

.share-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 2px;
    font-size: 0.75rem;
    color: #fff;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.btn-modal-dismiss {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 0.45rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-modal-dismiss:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Estilo para el indicador de tiempo de publicación en el footer */
.publish-time-display {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
