* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8fafc;
    color: #334155;
    padding-bottom: 3rem;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.nav-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-box {
    width: 2rem;
    height: 2rem;
    background-color: #0f172a;
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.875rem;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.logo-accent {
    color: #64748b;
    font-weight: 400;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.nav-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-grid {
    max-width: 1140px;
    margin: 2rem auto 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 4fr 8fr;
    }
}

.card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.card-title {
    font-size: 0.825rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.server-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s;
}

.tab-btn.active {
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.input-wrapper-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.input-wrapper-icon input {
    padding-left: 2.5rem !important;
}

.input-group input {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    color: #0f172a;
    font-size: 0.875rem;
    outline: none;
}

.input-group input:focus {
    border-color: #0f172a;
}

.lang-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-select-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lang-dropdown {
    position: relative;
}

.lang-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-width: 10.5rem;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.4rem 0.7rem;
    border-radius: 0.45rem;
    cursor: pointer;
    text-align: left;
}

.lang-select::after {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    border-right: 1.5px solid #64748b;
    border-bottom: 1.5px solid #64748b;
    transform: rotate(45deg) translateY(-1px);
    flex-shrink: 0;
}

.lang-select:focus,
.lang-dropdown.open .lang-select {
    outline: none;
    border-color: #0f172a;
}

.lang-dropdown.open .lang-select::after {
    transform: rotate(-135deg) translateY(-1px);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 100;
    list-style: none;
    margin: 0;
    min-width: 100%;
    width: max-content;
    max-height: 16rem;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    padding: 0.35rem;
}

.lang-menu[hidden] {
    display: none;
}

.lang-option {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    padding: 0.5rem 0.7rem;
    border-radius: 0.35rem;
    cursor: pointer;
    white-space: nowrap;
}

.lang-option:hover,
.lang-option:focus {
    background: #f1f5f9;
    color: #0f172a;
    outline: none;
}

.lang-option.active {
    background: #0f172a;
    color: #ffffff;
}

.lang-option.active:hover,
.lang-option.active:focus {
    background: #1e293b;
    color: #ffffff;
}

.input-tip {
    font-size: 11px;
    color: #64748b;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.auth-error {
    font-size: 0.8rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.45rem;
    padding: 0.55rem 0.7rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.submit-button {
    width: 100%;
    padding: 0.75rem 0;
    background-color: #0f172a;
    border: none;
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.submit-button:hover {
    background-color: #1e293b;
}

.empty-card {
    background-color: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    height: 20rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

.empty-icon {
    color: #94a3b8;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.empty-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.empty-card p {
    font-size: 0.75rem;
    color: #64748b;
    max-width: 24rem;
    line-height: 1.5;
}

.profile-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 576px) {
    .profile-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.server-tag {
    font-size: 10px;
    font-weight: 700;
    background-color: #f1f5f9;
    color: #334155;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.player-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.25rem;
    letter-spacing: -0.02em;
}

.verification-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.verification-text i {
    color: #10b981;
}

.rating-display {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.box-lbl {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}

.rating-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.dan-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.divider-line {
    width: 1px;
    height: 2rem;
    background-color: #e2e8f0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

@media (min-width: 576px) {
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.metric-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.metric-item span {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.metric-item strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.125rem;
}

.songs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-subtitle {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.5rem;
    color: #94a3b8;
    font-size: 0.65rem;
}

#songFilter {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem 0.25rem 1.5rem;
    color: #0f172a;
    font-size: 0.75rem;
    outline: none;
    width: 9rem;
}

#songFilter:focus {
    border-color: #0f172a;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.song-row {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.85rem;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .song-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.song-meta-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.difficulty-pill {
    width: 0.25rem;
    height: 2.5rem;
    border-radius: 4px;
}

.remaster-color { background-color: #a855f7; }
.master-color { background-color: #ef4444; }

.song-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.song-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
    align-items: center;
}

.level-tag {
    font-size: 10px;
    font-weight: 600;
    background-color: #f1f5f9;
    color: #475569;
    padding: 0.125rem 0.35rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.time-tag {
    font-size: 10px;
    color: #64748b;
}

.song-stats-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.5rem;
}

@media (min-width: 576px) {
    .song-stats-right {
        border-top: none;
        padding-top: 0;
    }
}

.score-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.score-pct {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    font-family: monospace;
}

.flag-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.ap-flag {
    background-color: #fef08a;
    color: #713f12;
    border: 1px solid #fde047;
}

.fc-flag {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.hidden { 
    display: none !important; 
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(15, 23, 42, 0.2);
    border-radius: 50%;
    border-top-color: #0f172a;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { 
    to { 
        transform: rotate(360deg); 
    } 
}

.svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.text-accent {
    color: #475569;
    margin-right: 0.25rem;
}
