:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --primary: #ff4757;
    --primary-dark: #ff6b81;
    --text-main: #f1f2f6;
    --text-muted: #a4b0be;
    --shadow: 0 10px 20px rgba(0,0,0,0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    background: rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
    padding: 20px;
    overflow: hidden;
}

.card-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    perspective: 1000px;
}

.player-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    will-change: transform, opacity;
}

.player-card.swipe-out {
    transform: translateX(120%) rotate(15deg);
    opacity: 0;
}

.player-card.swipe-in {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.8) translateY(50px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.player-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary);
}

.player-info {
    padding: 20px;
}

.player-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
}

.stats-group {
    margin-bottom: 15px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.stat-value-display {
    color: var(--primary);
    font-weight: 800;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #333;
    border-radius: 3px;
}

input[type=range]:focus {
    outline: none;
}

.btn-rate {
    width: 100%;
    padding: 18px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 12px;
    margin-top: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-rate:active {
    transform: scale(0.96);
}

.loading, .no-more-players {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    padding: 50px 20px;
}

/* Stats Page */
.stats-container {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-container h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--text-main);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-card-header {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.stat-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--primary);
}

.stat-name {
    font-size: 1.3rem;
    font-weight: 800;
}

.stat-rating-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.chart-container {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
}
.btn-delete { background: #ff4757; color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: background 0.2s; } .btn-delete:hover { background: #ff6b81; }
