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

:root {
    /* Colors */
    --primary-color: #015470;     /* Dark Blue */
    --primary-light: rgba(1, 84, 112, 0.08);
    --primary-dark: #003e54;
    --accent-color: #f27900;      /* Orange */
    --accent-light: rgba(242, 121, 0, 0.08);
    --accent-hover: #d66a00;
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    
    /* Layout */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Header Styles */
header {
    background-color: var(--white);
    border-bottom: 2px solid var(--primary-light);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section img {
    height: 48px;
    object-fit: contain;
}

.logo-text h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

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

.logo-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Navigation Views */
.view-nav {
    display: flex;
    background-color: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.view-btn {
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: calc(var(--radius-md) - 2px);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-btn:hover {
    color: var(--primary-color);
}

.view-btn.active {
    background-color: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--accent-color);
}

/* Main Container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Search and Filters Section */
.search-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-select {
    padding: 0.8rem 2rem 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1rem;
    min-width: 160px;
}

.filter-select:focus {
    border-color: var(--primary-color);
}

.btn-reset {
    padding: 0.8rem 1.2rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

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

/* Date Timeline Picker */
.timeline-section {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.timeline-nav {
    display: flex;
    gap: 0.5rem;
}

.timeline-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: var(--transition);
}

.timeline-nav-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.timeline-scroll-container {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    display: flex;
    gap: 0.8rem;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
}

.timeline-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.timeline-item {
    flex: 0 0 90px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.timeline-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.timeline-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.timeline-item .day-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.timeline-item.active .day-name {
    color: var(--accent-color);
}

.timeline-item .day-num {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    line-height: 1.1;
}

.timeline-item.active .day-num {
    color: var(--white);
}

.timeline-item .month-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.timeline-item.active .month-name {
    color: rgba(255, 255, 255, 0.8);
}

/* Matches Grid View */
.matches-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 0.75rem;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 480px) {
    .matches-grid {
        grid-template-columns: 1fr;
    }
}

/* Match Card Styles */
.match-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

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

.match-card.knockout::before {
    background-color: var(--accent-color);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}

.match-number {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.match-stage {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

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

.team-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

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

.team-score {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    width: 30px;
    text-align: right;
}

.team-row.winner .team-name {
    color: var(--primary-color);
    font-weight: 700;
}

.team-row.winner::after {
    content: '▲';
    font-size: 0.6rem;
    color: var(--accent-color);
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
}

.match-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-color);
    padding-top: 0.8rem;
}

.match-stadium {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.match-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--primary-color);
}

.match-time span {
    background-color: var(--accent-light);
    color: var(--accent-color);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background-color: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.empty-state h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

/* Groups View Styles */
.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.group-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.group-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.group-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-header span {
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
}

.group-teams-list {
    padding: 0.75rem 0;
}

.group-team-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.2rem;
    border-bottom: 1px solid var(--bg-secondary);
}

.group-team-item:last-child {
    border-bottom: none;
}

.group-team-item .team-pos {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 15px;
}

.group-team-item .team-code {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-left: auto;
}

/* Knockout Bracket View Styles */
.bracket-wrapper {
    overflow-x: auto;
    padding: 1rem 0;
}

.bracket-container {
    display: flex;
    gap: 2.5rem;
    min-width: 1200px;
    justify-content: space-between;
    padding: 1rem;
    position: relative;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
}

.bracket-round-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.bracket-match {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    width: 220px;
    margin: 1rem 0;
    position: relative;
}

.bracket-match::after {
    /* Connecting lines will be simulated simply or handled with styling layout */
}

.bracket-match-info {
    font-size: 0.7rem;
    background-color: var(--bg-secondary);
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: calc(var(--radius-md) - 1px);
    border-top-right-radius: calc(var(--radius-md) - 1px);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-weight: 600;
}

.bracket-match-teams {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.bracket-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.bracket-team-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.bracket-team.winner {
    color: var(--primary-color);
    font-weight: 700;
    background-color: var(--primary-light);
}

.bracket-score {
    margin-left: auto;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

/* Stadiums View Styles */
.stadiums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.stadium-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stadium-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stadium-image-placeholder {
    height: 140px;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
    text-align: center;
}

/* Overlaying clean vector effects inside placeholders */
.stadium-image-placeholder::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: var(--white);
    transform: skewY(-3deg);
}

.stadium-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.stadium-placeholder-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.stadium-details {
    padding: 1.5rem 1.25rem 1.25rem;
    position: relative;
    z-index: 2;
}

.stadium-city {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stadium-real-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.stadium-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stadium-meta span strong {
    color: var(--text-main);
}

/* Footer Section */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    margin-top: 4rem;
    background-color: var(--bg-secondary);
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.footer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.footer-colors {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.color-dot.blue { background-color: var(--primary-color); }
.color-dot.orange { background-color: var(--accent-color); }

/* Quick Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 99;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}
