@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');

:root {
    --bg-color: #0d0d0d;
    --nav-bg: rgba(13, 13, 13, 0.8);
    --primary-green: #8cb89c;
    --secondary-green: #b9e0c8;
    --text-color: #ffffff;
    --text-muted: #a1a1aa;
    --card-bg: rgba(140, 184, 156, 0.15);
    --border-color: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Sans MS', 'Comic Sans', 'Comic Neue', cursive, sans-serif;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(to bottom, #b9e0c8 0%, #8cb89c 20%, #2a2a2a 70%, #151515 100%);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #b9e0c8e6;
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 2px solid var(--primary-green);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a2f23;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-decoration: none;
}

.nav-logo-img {
    height: 35px;
    width: auto;
    filter: drop-shadow(0 0 2px rgba(26, 47, 35, 0.3));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-shadow:
        -1px -1px 0 var(--primary-green),
        1px -1px 0 var(--primary-green),
        -1px 1px 0 var(--primary-green),
        1px 1px 0 var(--primary-green);
}

.nav-links a:hover,
.nav-links a.active {
    color: #000;
}

/* Main Content */
.results-container {
    padding: 120px 5% 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
}

.results-title {
    font-size: 3.5rem;
    text-align: center;
    color: #ffffff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
    margin-bottom: 3rem;
}

.loading-spinner {
    text-align: center;
    font-size: 1.5rem;
    color: var(--secondary-green);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 10px var(--secondary-green);
    }

    100% {
        opacity: 0.5;
    }
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Player Card */
.player-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    overflow: hidden;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-green);
}

.card-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 250px;
    border-right: 1px solid var(--border-color);
    padding-right: 2.5rem;
}

.leetify-attribution {
    position: absolute;
    top: 15px;
    left: 15px;
    display: block;
    transition: transform 0.3s ease;
    z-index: 10;
}

.leetify-attribution:hover {
    transform: scale(1.05);
}

.leetify-logo {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 0 5px rgba(248, 73, 130, 0.3));
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.leetify-attribution:hover .leetify-logo {
    opacity: 1;
}

.player-avatar {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--primary-green);
    box-shadow: 0 0 15px rgba(140, 184, 156, 0.5);
    margin-bottom: 1rem;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-name {
    font-size: 1.8rem;
    color: #98f8c1;
}

.player-steamid {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.leetify-link {
    margin-top: 1rem;
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: bold;
    color: #ffffff;
    background: #1a2f23;
    border: 1px solid #F84982;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.leetify-link:hover {
    background: #F84982;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(248, 73, 130, 0.5);
}

.card-content {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.stats-category {
    flex: 1;
    min-width: 220px;
    margin-bottom: 0;
}

.stats-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 1.4rem;
    color: var(--secondary-green);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.stat-bar-group {
    margin-bottom: 1.2rem;
}

.stat-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.stat-bar-info .stat-label {
    margin-bottom: 0;
    font-size: 1rem;
    color: #ffffff;
}

.stat-bar-info .stat-value {
    font-size: 1.2rem;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 6px;
    width: 0%;
    transition: width 1s ease-out, background-color 0.3s ease;
}

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

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--secondary-green);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.error-text {
    color: #ff6b6b;
    font-size: 1.2rem;
    text-align: center;
    font-weight: bold;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .player-card {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .card-sidebar {
        flex: 1 1 auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 1.5rem;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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