:root {
    --bg-dark: #050505;
    --bg-panel: rgba(20, 20, 20, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;

    /* Dzienny Theme (Gold/Fire) */
    --theme-dzienny: #ffd700;
    --theme-dzienny-glow: rgba(255, 215, 0, 0.3);

    /* Anime Theme (Pink/Sakura) */
    --theme-anime: #ff69b4;
    --theme-anime-glow: rgba(255, 105, 180, 0.3);

    --transition-speed: 0.3s;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(50, 0, 0, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 0, 50, 0.2) 0%, transparent 40%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
.nav-btn {
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    margin: 0;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 3px;
    margin-top: 0.5rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--text-secondary), transparent);
}

/* Navigation */
.bot-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.nav-btn {
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 1rem 3rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.nav-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Active States for Tabs */
.nav-btn:nth-child(1).active {
    border-color: var(--theme-dzienny);
    color: var(--theme-dzienny);
    box-shadow: 0 0 20px var(--theme-dzienny-glow);
}

.nav-btn:nth-child(2).active {
    border-color: var(--theme-anime);
    color: var(--theme-anime);
    box-shadow: 0 0 20px var(--theme-anime-glow);
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.card:hover::before {
    transform: translateX(100%);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Specific Theme Glows for Cards */
#dzienny-section .card:hover {
    border-color: var(--theme-dzienny);
}

#anime-section .card:hover {
    border-color: var(--theme-anime);
}

/* Tables */
.leaderboard-section {
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.leaderboard-section h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    border-left: 4px solid;
    padding-left: 1rem;
}

#dzienny-section h2 {
    border-color: var(--theme-dzienny);
    color: var(--theme-dzienny);
}

#anime-section h2 {
    border-color: var(--theme-anime);
    color: var(--theme-anime);
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

td {
    padding: 1.2rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    transition: background var(--transition-speed);
}

tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge.level {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Top 3 Ranks */
tr:nth-child(1) td {
    color: #ffd700;
    font-weight: bold;
}

tr:nth-child(2) td {
    color: #c0c0c0;
    font-weight: bold;
}

tr:nth-child(3) td {
    color: #cd7f32;
    font-weight: bold;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

    .nav-btn:hover {
        color: var(--text-primary);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

    /* Active States for Tabs */
    .nav-btn:nth-child(1).active {
        border-color: var(--theme-dzienny);
        color: var(--theme-dzienny);
        box-shadow: 0 0 20px var(--theme-dzienny-glow);
    }

    .nav-btn:nth-child(2).active {
        border-color: var(--theme-anime);
        color: var(--theme-anime);
        box-shadow: 0 0 20px var(--theme-anime-glow);
    }

    /* Cards */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        margin-bottom: 4rem;
    }

    .card {
        background: var(--bg-panel);
        backdrop-filter: blur(10px);
        padding: 2rem;
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        transition: all var(--transition-speed) ease;
        position: relative;
        overflow: hidden;
    }

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transform: translateX(-100%);
        transition: transform 0.5s ease;
    }

    .card:hover::before {
        transform: translateX(100%);
    }

    .card:hover {
        transform: translateY(-5px);
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .card h3 {
        color: var(--text-secondary);
        font-size: 0.9rem;
        margin: 0;
    }

    .value {
        font-size: 3rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-top: 0.5rem;
        text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    /* Specific Theme Glows for Cards */
    #dzienny-section .card:hover {
        border-color: var(--theme-dzienny);
    }

    #anime-section .card:hover {
        border-color: var(--theme-anime);
    }

    /* Tables */
    .leaderboard-section {
        background: var(--bg-panel);
        backdrop-filter: blur(10px);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        padding: 2rem;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    }

    .leaderboard-section h2 {
        margin-top: 0;
        margin-bottom: 2rem;
        font-size: 1.5rem;
        border-left: 4px solid;
        padding-left: 1rem;
    }

    #dzienny-section h2 {
        border-color: var(--theme-dzienny);
        color: var(--theme-dzienny);
    }

    #anime-section h2 {
        border-color: var(--theme-anime);
        color: var(--theme-anime);
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 0.5rem;
    }

    th {
        text-align: left;
        padding: 1rem;
        color: var(--text-secondary);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    td {
        padding: 1.2rem 1rem;
        background: rgba(255, 255, 255, 0.02);
        transition: background var(--transition-speed);
    }

    tr td:first-child {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    tr td:last-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    tr:hover td {
        background: rgba(255, 255, 255, 0.05);
    }

    /* Badges */
    .badge {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

    .badge.level {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--text-primary);
    }

    /* Top 3 Ranks */
    tr:nth-child(1) td {
        color: #ffd700;
        font-weight: bold;
    }

    tr:nth-child(2) td {
        color: #c0c0c0;
        font-weight: bold;
    }

    tr:nth-child(3) td {
        color: #cd7f32;
        font-weight: bold;
    }

    /* Animations */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .bot-section {
        animation: fadeIn 0.5s ease;
    }

    .desc-input {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
        padding: 0.5rem;
        border-radius: 4px;
        width: 100%;
        font-family: 'Inter', sans-serif;
        transition: all 0.3s ease;
    }

    .desc-input:focus {
        outline: none;
        border-color: var(--accent-color);
        background: rgba(0, 0, 0, 0.5);
    }