:root {
    --primary: #00d2ff;
    --primary-dark: #00a8cc;
    --secondary: #ff8c00;
    --bg-dark: #0a192f;
    --bg-light: #172a45;
    --text-main: #e6f1ff;
    --text-dim: #8892b0;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-blue: #64ffda;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.navbar .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo .accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.search-box {
    display: flex;
    background: var(--bg-light);
    border-radius: 50px;
    padding: 5px 15px;
    border: 1px solid var(--glass-border);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    outline: none;
    width: 200px;
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    background: url('../assets/hero_bg.jpg') no-repeat center center/cover;
    margin-bottom: 50px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.4));
}

.hero-content {
    position: relative;
    z-index: 10;
}

.badge {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

h1 .vs {
    font-size: 1.5rem;
    color: var(--text-dim);
    margin: 0 10px;
}

.match-info {
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 30px;
}

.score-board {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.team-score {
    font-size: 5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    background: linear-gradient(to bottom, #fff, #8892b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.divider {
    font-size: 3rem;
    color: var(--text-dim);
}

.btn {
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: #5ce1ff;
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--primary);
    margin-left: 15px;
}

.btn-secondary:hover {
    background: rgba(0, 210, 255, 0.1);
}

/* Stats & Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stats-block {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.stats-block h5 {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-dim);
}

.stat-value {
    font-weight: 700;
    color: var(--accent-blue);
}

/* Lineup Field */
.lineup-container {
    background: radial-gradient(circle at center, #1a3a5f 0%, #0a192f 100%);
    border-radius: 30px;
    padding: 60px 40px;
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    border: 2px solid var(--glass-border);
    min-height: 500px;
}

.goal-area {
    position: absolute;
    width: 200px;
    height: 10px;
    background: var(--primary);
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 20px var(--primary);
}

.goal-top {
    top: 0;
}

.goal-bottom {
    bottom: 0;
}

.player-node {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.player-node:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--primary);
}

.player-num {
    font-weight: 800;
    font-size: 1.2rem;
}

.player-name-tag {
    position: absolute;
    bottom: -30px;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    color: white;
}

/* Semi-circle positioning logic */
.pos-6 {
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    border-color: var(--secondary);
}

/* Centroboa */
.pos-3 {
    bottom: 220px;
    left: 50%;
    transform: translateX(-50%);
}

/* Marcatore */
.pos-1 {
    bottom: 150px;
    left: 15%;
}

/* Ala sinistra */
.pos-5 {
    bottom: 150px;
    left: 85%;
    transform: translateX(-100%);
}

/* Ala destra */
.pos-2 {
    bottom: 280px;
    left: 25%;
}

.pos-4 {
    bottom: 280px;
    left: 75%;
    transform: translateX(-100%);
}

/* Match Icons */
.match-event-icons {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-goal {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><circle cx="12" cy="12" r="10"/><path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z" fill="%23000"/></svg>');
}

.icon-yellow {
    background: #ffd700;
    border-radius: 2px;
}

.icon-red {
    background: #ff4d4d;
    border-radius: 2px;
}

.icon-injury {
    color: #ff8c00;
    font-weight: bold;
    font-size: 12px;
}

/* Roster List Typography */
.roster-section {
    margin-top: 40px;
}

.roster-group-title {
    color: var(--primary);
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.roster-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--glass);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: 0.2s;
}

.roster-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-light);
    margin-right: 20px;
    overflow: hidden;
}

.player-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lineup-container {
        padding: 40px 10px;
        min-height: 400px;
    }

    .player-node {
        width: 45px;
        height: 45px;
    }

    .player-num {
        font-size: 0.9rem;
    }
}
/* --- Teams Page Grid --- */
.grid-teams {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.team-card {
    display: flex;
    flex-direction: column;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border: 1px solid transparent;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.15);
}

.team-card.favorite-active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.9), rgba(0, 210, 255, 0.05));
}

.team-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.team-logo-small {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    border: 3px solid #ccc;
}

.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.5;
    transition: transform 0.2s, opacity 0.2s;
}

.fav-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

.fav-btn.active {
    opacity: 1;
}

.team-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--text-light);
}

.team-info h3:hover {
    color: var(--primary);
}

.team-meta {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
}

.team-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    background: var(--bg-light);
    padding: 5px;
    border-radius: 10px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--primary);
    color: var(--bg-dark);
}

.filter-btn:hover:not(.active) {
    color: var(--text-light);
    background: rgba(255,255,255,0.05);
}

/* Navigation Arrows */
.nav-history {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}

.history-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 1.1rem;
    padding-bottom: 2px; /* Visual alignment for arrows */
}

.history-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
}
