:root {
    --primary: #8a2be2;
    --secondary: #00d2ff;
    --accent: #ff007f;
    --bg-dark: #0f0c29;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-dim: #b0b0b0;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem 4rem 1rem;
    position: relative;
}

.background-radial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(0, 210, 255, 0.15) 0%, transparent 40%);
    z-index: -1;
}

.glass-container {
    width: 100%;
    max-width: 1000px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.lang-selector-container {
    position: absolute;
    top: 0;
    right: 0;
}

.lang-selector-container select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: white;
    padding: 0.4rem 0.8rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.lang-selector-container select option {
    background-color: var(--bg-dark);
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

header h1 span {
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.search-section {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-bar {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
}

.search-bar.multi-search {
    display: flex;
    padding: 0.3rem;
}

.input-wrapper {
    flex: 1;
    display: flex;
}

.input-wrapper:first-child {
    flex: 2;
    border-right: 1px solid var(--glass-border);
}

.search-bar input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    font-family: inherit;
}

.club-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    min-height: 2rem;
}

.tag {
    background: rgba(0, 210, 255, 0.15);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.tag span {
    cursor: pointer;
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.search-bar button {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 1.2rem;
    color: white;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-bar button:hover {
    transform: scale(1.05);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

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

.range-group label {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.year-inputs {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.year-inputs select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: white;
    padding: 0.4rem 0.8rem;
    font-family: inherit;
    outline: none;
}

.year-inputs select option {
    background-color: var(--bg-dark);
    color: white;
}

#resultsArea {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.player-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.player-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(10px);
    border-color: var(--secondary);
}

.player-card .main-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.player-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
    width: 300px;
}

.player-info {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
}

.player-info p {
    margin: 0;
}

.elo-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1rem;
    background: rgba(138, 43, 226, 0.15);
    border-radius: 2rem;
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--bg-dark);
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 900px;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
}

.close {
    position: absolute;
    right: 2rem;
    top: 1.5rem;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
}

.chart-wrapper {
    margin: 2rem 0;
    background: rgba(0,0,0,0.2);
    border-radius: 1rem;
    padding: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary);
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.tab {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    padding: 0.5rem 1.5rem;
    border-radius: 0.8rem;
    cursor: pointer;
}

.tab.active {
    background: var(--secondary);
    color: var(--bg-dark);
    font-weight: 600;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-dim);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(15, 12, 41, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { bottom: -100px; opacity: 0; }
    to { bottom: 20px; opacity: 1; }
}

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

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-buttons button {
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border: none;
}

.cookie-buttons button:hover {
    transform: scale(1.05);
}

.cookie-buttons .btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
}

.cookie-buttons .btn-secondary {
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-dim);
}

.cookie-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Corner Bulb */
.corner-bulb {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 120px;
    height: auto;
    z-index: -1;
    opacity: 0.8;
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.4));
}

