/* CSS Variables for Dark Tech/Glass Theme */
:root {
    --primary-blue: #38bdf8; /* Bright tech blue */
    --secondary-blue: #0284c7;
    --light-blue: rgba(56, 189, 248, 0.15);
    --dark-blue: #7dd3fc;
    --white: #ffffff;
    --background: #050811; /* Deeper slate black-blue */
    --surface: rgba(56, 189, 248, 0.04); /* Blue-tinted liquid glass surface */
    --surface-hover: rgba(56, 189, 248, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(56, 189, 248, 0.12); /* Brighter cyan-blue border */
    --border-light: rgba(56, 189, 248, 0.22);
    --live-red: #ef4444;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.2);
    --glass-blur: blur(16px) saturate(180%);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #02040a; /* Ultra dark tech space background */
    background-image: radial-gradient(circle at 50% 0%, #0c1527, #02040a 75%);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* Mobile Mockup Container */
.app-container {
    width: 100%;
    max-width: 430px; /* Mobile width (iPhone Pro Max) */
    height: 932px; /* Mobile height */
    max-height: 100vh;
    background-color: var(--background);
    background-image: linear-gradient(rgba(5, 8, 17, 0.45), rgba(5, 8, 17, 0.75)), url('IMG/6.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 12px solid #1e293b;
    border-radius: 40px;
    scrollbar-width: none;
}
.app-container::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .app-container {
        max-width: 100%;
        height: 100vh;
        border: none;
        border-radius: 0;
    }
}

/* Auth Screen */
.auth-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    padding: 2rem;
    gap: 2rem;
}

.auth-logo {
    max-width: 140px; /* slightly smaller logo */
    height: auto;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.2));
}

/* Navbar */
.navbar {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    border-top-left-radius: 28px; /* Match inner radius of app-container */
    border-top-right-radius: 28px;
    overflow: hidden;
}

.nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0; /* Remove gap so banner is flush */
}

.text-logo {
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    padding: 1rem; /* Moved padding here from nav-container */
}

.nav-btn {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    font-size: 0.75rem; /* smaller to fit 4 */
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.6rem 0.3rem; /* less padding */
    border-radius: 10px;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.nav-btn:hover {
    color: var(--text-main);
    border-color: var(--border-light);
    background: var(--surface-hover);
}

.nav-btn.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    border: none;
    box-shadow: var(--shadow-glow);
}

/* Countdown Banner */
.countdown-banner {
    background: rgba(2, 132, 199, 0.2);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    text-align: center;
    gap: 1rem;
}

.countdown-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.fwc-logo {
    height: 45px;
    filter: invert(1) brightness(2);
    object-fit: contain;
}

.countdown-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.countdown-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.countdown-timer {
    display: flex;
    gap: 1rem;
    background: var(--surface);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-box span {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--white);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.time-box small {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    padding: 1rem;
    padding-bottom: 5rem; /* Space for the bottom points bar */
}

.view {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view.active {
    display: block;
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.section-header h2 {
    color: var(--white);
    font-weight: 800;
    font-size: 1.3rem;
}

.live-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--live-red);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Match Cards (Liquid Glass) */
.matches-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.match-card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.match-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: var(--border-light);
    background: var(--surface-hover);
}

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

.match-status {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 1px;
}

.match-status.live-text {
    color: var(--live-red);
    text-shadow: 0 0 5px rgba(239,68,68,0.5);
}

.team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 5px;
    border-radius: 12px;
    transition: var(--transition);
}

.selectable-team {
    cursor: pointer;
}

.selectable-team:hover {
    background: rgba(255, 255, 255, 0.1);
}

.selected-prediction {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid var(--primary-blue);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

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

.score {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--white);
}

.winner .team-name, .winner .score {
    color: var(--primary-blue);
    text-shadow: 0 0 8px rgba(56,189,248,0.4);
}

/* Standings View */
.standings-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.group-table {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.group-table::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.group-table h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.group-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.group-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.group-table th.team, .group-table td.team {
    text-align: left;
}

.group-table td {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-main);
    font-weight: 500;
}

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

.group-table .pos {
    font-weight: 800;
    color: var(--text-muted);
    width: 25px;
}

.group-table .team {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}

.group-table .pts {
    font-weight: 800;
    color: var(--primary-blue);
}

.flag-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

/* Match Label (e.g., M74) */
.match-label {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: var(--white);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
}

/* Register / Auth / Profile View (Liquid Glass) */
.register-container, .profile-container {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 320px; /* Make it smaller and centered */
    margin: 0 auto;
}

.register-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* reduce gap */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 600;
    color: var(--white);
    font-size: 0.8rem; /* smaller label */
}

.form-group input {
    background: rgba(255,255,255,0.05);
    padding: 0.7rem 0.9rem; /* smaller padding */
    border: 1px solid var(--border-color);
    border-radius: 10px; /* slightly less round */
    font-size: 0.85rem; /* smaller text */
    font-family: inherit;
    color: var(--white);
    transition: var(--transition);
}

.form-group input::placeholder {
    color: rgba(255,255,255,0.3);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.submit-btn {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: var(--white);
    border: none;
    padding: 0.8rem; /* smaller padding */
    font-size: 0.95rem; /* smaller text */
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
    filter: brightness(1.1);
}

/* Ranking View */
.ranking-container {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.podium-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 2rem;
    margin-top: 3rem;
    height: 120px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    border-radius: 8px 8px 0 0;
    width: 30%;
    color: #000;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
    position: relative;
    padding-bottom: 5px;
}

.podium-place .avatar {
    width: 40px;
    height: 40px;
    background: var(--surface);
    border-radius: 50%;
    position: absolute;
    top: -45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid;
    color: var(--white);
    backdrop-filter: var(--glass-blur);
}

.podium-place .name {
    position: absolute;
    top: -65px;
    font-size: 0.75rem;
    white-space: nowrap;
    color: var(--white);
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
    font-weight: 600;
}

.place-1 { height: 100px; background: linear-gradient(135deg, #ffd700, #b8860b); z-index: 3; }
.place-1 .avatar { border-color: #ffd700; width: 50px; height: 50px; top: -55px; font-size: 1.5rem; }
.place-1 .name { top: -75px; font-size: 0.85rem; color: #ffd700; }

.place-2 { height: 70px; background: linear-gradient(135deg, #e0e0e0, #9e9e9e); z-index: 2; }
.place-2 .avatar { border-color: #e0e0e0; }

.place-3 { height: 50px; background: linear-gradient(135deg, #cd7f32, #8b4513); z-index: 1; }
.place-3 .avatar { border-color: #cd7f32; }

.ranking-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary-blue);
}

.ranking-list-item .rank-num {
    font-weight: 800;
    color: var(--text-muted);
    width: 25px;
}
.ranking-list-item .rank-name {
    flex: 1;
    font-weight: 600;
}
.ranking-list-item .rank-pts {
    font-weight: 800;
    color: var(--primary-blue);
}

/* Video Ad Modal */
.ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 40px; /* match container if needed, but it's internal */
}

@media (max-width: 768px) {
    .ad-modal { border-radius: 0; }
}

.ad-content {
    background: var(--surface);
    border: 1px solid var(--primary-blue);
    padding: 1.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.ad-content h3 {
    color: var(--white);
    font-size: 1.1rem;
}

.logo-carousel-container {
    width: 100%;
    background: #0f172a; /* Dark background to hide white lines */
    padding: 0;
    margin: 0;
    line-height: 0;
    overflow: hidden;
    position: relative;
}

.logo-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}

.logo-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none; /* Prevent drag ghost on desktop */
    margin: 0;
    padding: 0;
    border: none;
    vertical-align: bottom; /* Removes tiny white space below inline elements */
}

/* Carousel Dots */
.carousel-indicators {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.carousel-indicators .dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicators .dot.active {
    background: var(--white);
    width: 16px;
    border-radius: 4px;
}

.video-container {
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.ad-claim-btn {
    background: #4b5563; /* disabled color */
    color: #9ca3af;
    border: none;
    padding: 0.8rem;
    font-weight: 800;
    font-size: 1rem;
    border-radius: 10px;
    transition: var(--transition);
}

.ad-claim-btn:not(:disabled) {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: pulseGreen 2s infinite;
}

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

.form-success-msg {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.toggle-form {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Prediction System (Quiniela) */
.points-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--primary-blue);
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
}

.free-points-btn {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    transition: var(--transition);
    animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
    0% { transform: scale(1); box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(251, 191, 36, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); }
}

.free-points-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.points-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.points-number {
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.prediction-history-item {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    border-left: 4px solid var(--text-muted);
}

.prediction-history-item.correct {
    border-left-color: #10b981; /* Green */
}

.prediction-history-item.wrong {
    border-left-color: #ef4444; /* Red */
}

.prediction-history-item.pending {
    border-left-color: var(--primary-blue); /* Blue */
}


.toggle-form a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.toggle-form a:hover {
    text-decoration: underline;
    color: var(--white);
}

/* Golden Match */
.golden-match {
    background: linear-gradient(135deg, #FFD700 0%, #FFDF00 50%, #FFC000 100%);
    border: 2px solid #B8860B;
    box-shadow: 0 8px 20px rgba(218, 165, 32, 0.4);
    transform: scale(1.02);
    margin: 1rem 0;
    border-radius: 20px;
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
}

.golden-match .match-status {
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 1px;
}

.golden-match .team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.golden-match .team-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.golden-match .flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.golden-match .team-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.golden-match .score {
    font-weight: 800;
    font-size: 1.2rem;
}

/* Centered Match Layout */
.teams-vs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    width: 100%;
}

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

.flag-center {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.team-name-center {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner .team-name-center {
    color: var(--primary-blue);
    text-shadow: 0 0 8px rgba(56,189,248,0.4);
}

.vs-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    gap: 0.2rem;
}

.vs-text {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.score-center {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Prediction Buttons Grid */
.prediction-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.pred-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pred-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-color: var(--border-light);
}

.pred-btn.selected-prediction {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* Category Selection Screen Styles */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

.category-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.category-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15), var(--shadow-glow);
}

.category-card:active {
    transform: translateY(0) scale(0.98);
}

.category-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 1rem;
}

.category-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.category-prize-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.category-prize-badge.cash {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.category-prize-badge.prize {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary-blue);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.category-prize {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

.back-to-categories-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
}

.back-to-categories-btn:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Category Badges for Profiles & Rankings */
.badge-account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 6px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.badge-account.personal {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-account.colegio {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.badge-account.universidad {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-account-inst {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* User Account Profile Card */
.profile-header-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.profile-header-card:hover {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.05);
}

.profile-avatar {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}

.profile-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.2rem;
}

.profile-institution {
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.profile-points {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-points span {
    color: var(--primary-blue);
    font-weight: 800;
}

/* Global BG image applied to app-container */

/* Push down selector buttons & login button */
#category-box .category-list {
    margin-top: 2rem; /* Pushes category cards down */
}

.login-submit-btn {
    margin-top: 2.2rem !important; /* Pushes login button down, registration is unchanged */
}

/* Subtle animation loop for the main logo every 30s */
@keyframes logo-animate {
    0%, 90%, 100% {
        transform: scale(1);
    }
    93% {
        transform: scale(1.08);
    }
    96% {
        transform: scale(0.96);
    }
    98% {
        transform: scale(1.03);
    }
}

.auth-logo {
    animation: logo-animate 30s infinite ease-in-out;
}

/* Tabs for separate rankings (Global, Colegios, Universidades) */
.ranking-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.rank-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.55rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

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

.rank-tab-btn.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
}






