:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #ec4899;
    --primary-hover: #db2777;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Navbar Styling */
.navbar {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: -0.05em;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}
.nav-links a.active {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.2rem;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 3rem 2rem;
    flex: 1;
}

.container-large {
    max-width: 1200px;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

header h1 span {
    color: var(--primary);
}

header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.single-search {
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

.pvp-search-container {
    max-width: 700px;
    margin: 0 auto 2rem auto;
    text-align: center;
}

.pvp-search {
    margin-bottom: 1.5rem;
}

.btn-brawl {
    font-size: 1.1rem;
    padding: 0.8rem 3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 16px;
        gap: 0.5rem;
    }
    
    .search-box .mode-select {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px 16px 0 0;
        margin-right: 0;
        margin-bottom: 0;
    }
}

.input-col label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.mode-select-wrapper {
    text-align: center;
    margin-bottom: 1.5rem;
}

.mode-select {
    padding: 0.75rem 2.5rem 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    backdrop-filter: blur(10px);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65rem auto;
}

.mode-select:hover, .mode-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.mode-select option {
    background: #0f172a;
    color: #ffffff;
}

.search-box .mode-select {
    border: none;
    border-right: 1px solid var(--border);
    border-radius: 999px 0 0 999px;
    background-color: transparent;
    box-shadow: none;
    margin-right: 0.5rem;
    padding: 0.75rem 1.5rem 0.75rem 1rem;
    background-position: right 0.5rem top 50%;
}

.search-box {
    display: flex;
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    min-width: 150px;
}

input::placeholder {
    color: var(--text-muted);
}

button {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

button:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

#resultContainer, #loading, #errorContainer {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.4s ease;
}

#loading, #errorContainer {
    text-align: center;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.avatar-circular {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.profile-info {
    text-align: left;
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.profile-stats {
    color: var(--text-muted);
    font-weight: 600;
}

.profile-stats span {
    color: var(--text-main);
}

.highlight-star {
    color: #eab308 !important; /* Gold / Yellow */
    text-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
    font-weight: 800;
}

.profile-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}
.profile-col h2 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* PvP Layout */
.pvp-layout {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 2rem;
    align-items: start; /* change from center to start for scoreboard layout */
}

@media (max-width: 900px) {
    .pvp-layout {
        grid-template-columns: 1fr;
    }
    .pvp-player-left, .pvp-player-right {
        grid-row: auto;
    }
}

.pvp-scoreboard {
    margin-top: 1.5rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.scoreboard-item {
    margin-bottom: 0.8rem;
}
.scoreboard-item:last-child {
    margin-bottom: 0;
}
.scoreboard-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}
.scoreboard-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.stat-winner {
    color: #4ade80 !important; /* Neon Green */
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
    transform: scale(1.05);
}

.chart-container {
    position: relative;
    height: 380px; /* slightly taller for apex */
    width: 100%;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.hiding {
    animation: toastFadeOut 0.4s ease forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(100%) scale(0.9); }
}

.top-plays-section {
    margin-top: 2rem;
}

.top-plays-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.top-plays-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-play-card {
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 0 0 2000px rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.top-play-card:hover {
    transform: scale(1.02);
}

.top-play-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.top-play-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.top-play-content p {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.top-play-pp {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fde047;
}

.hidden {
    display: none !important;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

#errorContainer {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Recommender Section */
.recommender-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.recommender-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-main);
}

.rec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.rec-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rec-card:hover {
    transform: translateY(-5px);
}

.rec-push {
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}
.rec-push:hover {
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.2);
}

.rec-cover {
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}
.rec-cover:hover {
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

.rec-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}
.rec-icon {
    font-size: 2rem;
}
.rec-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}
.rec-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.capitalize {
}

.top-play-pp {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fde047;
}

.hidden {
    display: none !important;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

#errorContainer {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Recommender Section */
.recommender-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.recommender-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-main);
}

.rec-grid {
    display: flex;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .rec-grid {
        flex-direction: column;
    }
}

.rec-card {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rec-card:hover {
    transform: translateY(-5px);
}

.rec-push {
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}
.rec-push:hover {
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.2);
}

.rec-cover {
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}
.rec-cover:hover {
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

.rec-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}
.rec-icon {
    font-size: 2rem;
}
.rec-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}
.rec-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.capitalize {
    text-transform: capitalize;
    font-weight: 600;
    color: var(--text-main);
}

.rec-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.rec-list li a.rec-map-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    min-height: 72px;
}

.top-play-pp {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fde047;
}

.hidden {
    display: none !important;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

#errorContainer {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Recommender Section */
.recommender-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.recommender-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-main);
}

.rec-grid {
    display: flex;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .rec-grid {
        flex-direction: column;
    }
}

.rec-card {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rec-card:hover {
    transform: translateY(-5px);
}

.rec-push {
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}
.rec-push:hover {
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.2);
}

.rec-cover {
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}
.rec-cover:hover {
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

.rec-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}
.rec-icon {
    font-size: 2rem;
}
.rec-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}
.rec-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.capitalize {
    text-transform: capitalize;
    font-weight: 600;
    color: var(--text-main);
}

.rec-map-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.diff-text {
    font-size: 0.85rem;
    color: #cbd5e1;
}


/* Audio Player and Choke UI */
.audio-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 1rem;
    padding: 0;
}

.audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-primary);
    background: rgba(255, 255, 255, 0.2);
}

.audio-btn.playing {
    animation: neon-pulse 1.5s infinite;
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--accent-primary);
}

@keyframes neon-pulse {
    0% { box-shadow: 0 0 5px var(--accent-primary), 0 0 10px var(--accent-primary); }
    50% { box-shadow: 0 0 20px var(--accent-primary), 0 0 30px var(--accent-primary); }
    100% { box-shadow: 0 0 5px var(--accent-primary), 0 0 10px var(--accent-primary); }
}

.play-left-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rec-list li {
    position: relative;
}
.rec-audio-btn {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    z-index: 10;
    margin-right: 0;
}
.audio-btn:hover {
    transform: scale(1.1);
}

.choke-indicator {
    display: inline-block;
    color: #ef4444;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    position: relative;
    cursor: help;
}

.choke-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
    pointer-events: none;
    z-index: 20;
    backdrop-filter: blur(10px);
}
.choke-indicator:hover .choke-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 140%;
}

/* Advanced Stats & Badges */
.advanced-stats {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
    align-items: center;
}
.badge {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}
.badge-ss { color: #facc15; border-color: #facc15; }
.badge-s { color: #f87171; border-color: #f87171; }
.badge-a { color: #4ade80; border-color: #4ade80; }
.highlight-acc {
    font-weight: 800;
    color: var(--accent-primary);
    text-shadow: 0 0 5px var(--accent-primary);
}

/* Skill Grid */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.skill-grid-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.skill-grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
}
.skill-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.skill-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

/* AI Summary Box */
.ai-summary-box {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8));
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
}
.ai-header {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ai-summary-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Show All Button */
.show-all-btn {
    width: 100%;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.8rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.show-all-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
    color: var(--accent-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Recent Plays */
.recent-plays-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.live-indicator {
    font-size: 0.8rem;
    color: #ef4444;
    animation: neon-pulse 1.5s infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.recent-plays-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}
.recent-play-card {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}
.recent-content h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}
.recent-content p {
    font-size: 0.8rem;
    color: #cbd5e1;
}
.recent-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}
.new-badge {
    display: block;
    font-size: 0.75rem;
    background: var(--accent-secondary);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-top: 0.3rem;
}
.new-play {
    animation: new-score-flash 3s ease-out;
}
@keyframes new-score-flash {
    0% { box-shadow: 0 0 20px var(--accent-secondary); border-color: var(--accent-secondary); transform: scale(1.02); }
    100% { box-shadow: none; border-color: rgba(255,255,255,0.1); transform: scale(1); }
}

/* Scrollable Top Plays */
.scrollable-active {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.scrollable-active::-webkit-scrollbar {
    width: 6px;
}

.scrollable-active::-webkit-scrollbar-track {
    background: transparent;
}

.scrollable-active::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--accent-primary);
}

/* Discover Page Styles */
.filter-panel {
    background: rgba(30, 41, 59, 0.7);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.filter-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.filter-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.sr-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sr-inputs input {
    width: 80px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    outline: none;
    -moz-appearance: textfield;
}
.sr-inputs input::-webkit-outer-spin-button,
.sr-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.skill-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pill-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.pill-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    color: #0f172a;
    font-weight: bold;
}
.glow-btn {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    font-weight: bold;
    letter-spacing: 1px;
    padding: 1rem;
}
.glow-btn:hover {
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.8);
}

.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.beatmap-card {
    position: relative;
    height: 150px;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255,255,255,0.1);
}
.beatmap-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
    border-color: var(--accent-primary);
}
.beatmap-card-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}
.beatmap-card:hover .beatmap-card-bg {
    transform: scale(1.05);
}
.beatmap-play-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    opacity: 0.8;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0;
}
.beatmap-play-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}
.discover-link {
    position: absolute;
    bottom: 0;
    text-decoration: none;
    color: white;
    width: 100%;
    padding: 1rem;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    box-sizing: border-box;
}
.discover-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.discover-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- RESPONSIVE DESIGN (Mobile & Tablet) --- */
@media (max-width: 768px) {
    .container, .container-large {
        padding: 1.5rem 1rem;
        width: 100%;
    }
    .input-group {
        flex-direction: column !important;
        border-radius: 16px !important;
        padding: 20px !important;
    }
    .input-group input,
    .input-group select,
    .input-group button,
    .btn-primary, .mode-select {
        width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 0.5rem !important;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .stats-grid, .discover-grid, .pvp-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    .radar-container {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    .pvp-scoreboard {
        max-height: 400px;
    }
    .navbar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }
    .play-left-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* --- MICRO-INTERACTIONS (Animations & Buttons) --- */
.btn-primary, .pill-btn, .audio-btn, .choke-btn, .nav-links a, .beatmap-card, 
.play-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-primary:active, .pill-btn:active, .audio-btn:active, .choke-btn:active {
    transform: scale(0.95);
}

/* --- WHAT-IF CALCULATOR UX --- */
.choke-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.choke-details.expanded {
    max-height: 200px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.choke-btn {
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(236, 72, 153, 0.5);
    color: #f8fafc;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.choke-btn:hover {
    background: rgba(236, 72, 153, 0.4);
}

/* --- GLOBAL SEARCH BAR (Navbar) --- */
.global-search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 12px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.global-search-container:focus-within {
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.global-search-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    outline: none;
    width: 150px;
    transition: width 0.3s ease;
}

.global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.global-search-input:focus {
    width: 200px;
}

.global-search-icon {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-right: 6px;
}

.global-search-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    margin-left: 8px;
}

/* Shake Animation for Empty Profile */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border-color: #ef4444 !important;
}

/* --- RECENT PLAYS DETAILS --- */
.recent-play-card {
    cursor: pointer;
}

.recent-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
}

.recent-play-card.expanded .recent-details {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    font-size: 0.85rem;
}

.recent-stat-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 6px;
}

.recent-stat-box strong {
    display: block;
    color: var(--primary);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .global-search-container {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    .global-search-input, .global-search-input:focus {
        width: 100%;
    }
}

/* --- PROFILE REDIRECT & LIKE BUTTON --- */
.profile-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.profile-link:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#userAvatarLink:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.like-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(4px);
}
.like-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}
.like-btn.liked {
    background: rgba(251, 113, 133, 0.2);
    border-color: rgba(251, 113, 133, 0.5);
    color: #fb7185;
}

@keyframes shake-anim {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
.shake-anim {
    animation: shake-anim 0.4s ease;
}

@keyframes bounce-anim {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}
.bounce-anim {
    animation: bounce-anim 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- TEXT TRUNCATION & GRADE BADGES --- */
.map-title-truncate {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.discover-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grade-badge {
    font-weight: 900;
    font-size: 1.1rem;
    opacity: 0.85;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}
.grade-S { color: #fde047; }
.grade-SH { color: #cbd5e1; }
.grade-SS { color: #a3e635; }
.grade-SSH { color: #e2e8f0; }
.grade-A { color: #4ade80; }
.grade-B { color: #60a5fa; }
.grade-C { color: #c084fc; }
.grade-D { color: #f87171; }

/* --- MOD BADGES & PLAY STATS --- */
.play-stats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.mod-container {
    display: flex;
    gap: 4px;
    align-items: center;
}
.mod-badge {
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.mod-hd { background: rgba(234, 179, 8, 0.2); border-color: #eab308; color: #fde047; }
.mod-dt, .mod-nc { background: rgba(14, 165, 233, 0.2); border-color: #0ea5e9; color: #7dd3fc; }
.mod-hr { background: rgba(239, 68, 68, 0.2); border-color: #ef4444; color: #fca5a5; }
.mod-nm { display: none; }

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    color: var(--text-muted);
}
.empty-state h4 {
    color: var(--text-main);
    margin-bottom: 4px;
}
