@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

body {
    background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
    color: #fff;
    cursor: none;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Space Grotesk', sans-serif;
}

body.system-cursor {
    cursor: auto;
}

::selection {
    background: #ef4444;
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#osu-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 99999;
    margin-left: -15px;
    margin-top: -15px;
    will-change: transform;
}

#osu-cursor img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(255, 102, 170, 0.6));
}

.trail-dot {
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    width: 14px;
    height: 14px;
    background: rgba(255, 102, 170, 0.5);
    border-radius: 50%;
    margin-left: -7px;
    margin-top: -7px;
    animation: fadeTrail 0.3s linear forwards;
    will-change: transform, opacity;
}

@keyframes fadeTrail {
    to {
        transform: scale(0.2);
        opacity: 0;
    }
}

.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    mix-blend-mode: soft-light;
}

.bento-card {
    background-color: rgba(20, 20, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bento-card:hover {
    transform: translateY(-4px);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    z-index: 10;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    color: #888;
    cursor: pointer;
}

.nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-panel-clean {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100px;
    transition: border-color 0.2s;
    position: relative;
}

.stat-panel-clean:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.key-display {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    color: #444;
    transition: all 0.05s;
    text-transform: uppercase;
}

.key-display.active {
    background: #6366f1;
    color: white;
    border-color: #818cf8;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    transform: scale(0.95);
}

.score-row {
    transition: background-color 0.2s;
}

.score-row.open {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(99, 102, 241, 0.3);
}

.score-details-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease;
    opacity: 0;
}

.score-row.open .score-details-container {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.5s ease-in-out, opacity 0.4s ease;
}

.rank-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.rank-XH {
    color: #eef2f3;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.rank-X {
    color: #ffcc22;
    text-shadow: 0 0 10px rgba(255, 204, 34, 0.6);
}

.rank-SH {
    color: #e4e4e4;
}

.rank-S {
    color: #ffd700;
}

.rank-A {
    color: #22c55e;
}

.rank-B {
    color: #3b82f6;
}

.rank-C {
    color: #a855f7;
}

.rank-D {
    color: #ef4444;
}

.rank-F {
    color: #6b7280;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(20, 20, 23, 0.4);
    transition: background 0.2s;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.activity-item:last-child {
    border-bottom: none;
}

.specs-table {
    width: 100%;
    font-size: 11px;
    color: #aaa;
    border-collapse: collapse;
}

.specs-table td {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.specs-table td:last-child {
    text-align: right;
    color: #fff;
    font-weight: 600;
    font-family: monospace;
}

#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: rgba(20, 20, 23, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 100;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: all 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

#chart-tooltip {
    position: fixed;
    background: rgba(20, 20, 23, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: white;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.8);
    z-index: 99999;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
