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

:root {
    --bg-primary: #090714;
    --bg-secondary: #130f26;
    --bg-card: rgba(19, 15, 38, 0.7);
    --bg-card-hover: rgba(27, 22, 54, 0.85);
    --border-glow: rgba(189, 0, 255, 0.15);
    
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    --neon-green: #00ff88;
    --neon-purple: #bd00ff;
    --neon-blue: #00e5ff;
    --neon-yellow: #ffd700;
    --neon-red: #ff3366;
    
    --glow-green: 0 0 15px rgba(0, 255, 136, 0.4);
    --glow-purple: 0 0 15px rgba(189, 0, 255, 0.4);
    --glow-blue: 0 0 15px rgba(0, 229, 255, 0.4);
    
    --font-sans: 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(189, 0, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 255, 136, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
}

/* PWA App Shell - Mobile First */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: rgba(9, 7, 20, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 90px; /* Space for bottom nav */
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

/* Header */
header.app-header {
    background: rgba(19, 15, 38, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glow);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(19, 15, 38, 0.92);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glow);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 10px;
    z-index: 100;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
    flex: 1;
}

.bottom-nav-item i, .bottom-nav-item span.icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
    transition: var(--transition);
}

.bottom-nav-item:hover, .bottom-nav-item.active {
    color: var(--neon-green);
}

.bottom-nav-item.active i, .bottom-nav-item.active span.icon {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 5px var(--neon-green));
}

/* Typography & Layout elements */
.content-wrapper {
    padding: 20px;
}

h1, h2, h3, h4 {
    font-weight: 800;
    margin-bottom: 12px;
}

.section-title {
    font-size: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--neon-green);
    padding-left: 10px;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    width: 100%;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(90deg, #00ff88, #00e5ff);
    color: #000000;
    box-shadow: var(--glow-green);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
}

.btn-secondary {
    background: linear-gradient(90deg, #bd00ff, #ff007f);
    color: #ffffff;
    box-shadow: var(--glow-purple);
}

.btn-secondary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(189, 0, 255, 0.6);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid var(--neon-purple);
}

.btn-outline:hover {
    background: rgba(189, 0, 255, 0.1);
    box-shadow: var(--glow-purple);
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 14px;
    color: #ffffff;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--neon-green);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--glow-green);
}

/* Match Card Component */
.match-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.match-info-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.match-status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.match-status-badge.live {
    background: rgba(255, 51, 102, 0.15);
    color: var(--neon-red);
    border: 1px solid var(--neon-red);
    animation: pulse 1.5s infinite;
}

.match-status-badge.scheduled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.match-status-badge.finished {
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
}

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

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

.team-flag {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.team-name {
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.match-score-section {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    gap: 15px;
}

.match-vs {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Gamified Leaderboard / Ranking */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ranking-position {
    width: 32px;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ranking-position.first { color: var(--neon-yellow); font-size: 1.4rem; }
.ranking-position.second { color: #c0c0c0; font-size: 1.3rem; }
.ranking-position.third { color: #cd7f32; font-size: 1.2rem; }

.ranking-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid var(--neon-purple);
    background: var(--bg-secondary);
}

.ranking-details {
    flex-grow: 1;
}

.ranking-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.ranking-username {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ranking-score {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--neon-green);
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
}

/* Badges list */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    opacity: 0.4;
    transition: var(--transition);
}

.badge-item.active {
    opacity: 1;
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.05);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}

.badge-icon-wrap {
    font-size: 2.2rem;
    margin-bottom: 6px;
}

.badge-name {
    font-size: 0.7rem;
    font-weight: 700;
}

/* Confetti keyframes */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Alert system styling */
.alert {
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
}

.alert-danger {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
}

.alert-info {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
}

/* Banner da landing page */
.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.landing-title {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 800;
    background: linear-gradient(135deg, #00ff88 0%, #bd00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Podium CSS */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    height: 150px;
    margin-bottom: 30px;
    margin-top: 15px;
}

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

.podium-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 8px;
    border: 3px solid #718096;
}

.podium-column.first .podium-avatar { border-color: var(--neon-yellow); width: 64px; height: 64px; }
.podium-column.second .podium-avatar { border-color: #c0c0c0; }
.podium-column.third .podium-avatar { border-color: #cd7f32; }

.podium-step {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
}

.podium-column.first .podium-step { height: 75px; background: rgba(255, 215, 0, 0.1); border-color: var(--neon-yellow); }
.podium-column.second .podium-step { height: 50px; background: rgba(192, 192, 192, 0.1); border-color: #c0c0c0; }
.podium-column.third .podium-step { height: 35px; background: rgba(205, 127, 50, 0.1); border-color: #cd7f32; }

/* Grid of matches */
.matches-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Confetti Effect */
.confetti-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 20px;
    background: #ffd700;
    opacity: 0.8;
    top: -20px;
    animation: fall 3s infinite linear;
}

@keyframes fall {
    0% { top: -20px; transform: rotate(0deg) translateX(0); }
    100% { top: 100vh; transform: rotate(360deg) translateX(100px); }
}
