/* :root {
    --bg-color: #1e2124;
    --bg-color-light: #282b30;
    --card-bg: #2c2f33;
    --accent: #faa61a;
    --text-main: #ffffff;
    --text-dim: #b9bbbe;
    --text-danger: #d33535;
} */

:root {
    --bg-color: #d3cbb8;
    --card-bg: #384a63;
    --primary: #7399cd;
    --primary-hover: #5b6eae;
    --accent: #faa61a;
    --success: #43b581;
    --danger: #ed4245;
    --warning: #faa61a;
    --text-main: #ffffff;
    --text-dim: #ffffff;
    --text-danger: #d33535;
}


@font-face {
    font-family: 'MyLocalFontText';
    src: url('/sources/SpecialGothicExpandedOne-Regular.ttf') format('truetype');
    /* font-weight: bolder ; */
    /* font-weight: lighter; */
    /* font-style: normal; */
    /* font-size: smaller; */
    /* font-size: 1rem; */
    /* line-height: 0.5rem; */

}

@font-face {
    font-family: 'MyLocalFont';
    src: url('/sources/RadwaveFont_Regular.ttf') format('truetype');
    /* line-height: 10rem; */
    /* font-weight: lighter; */
    /* font-style: normal; */
    /* font-size: smaller; */
}


body {
    font-family: 'MyLocalFont', sans-serif;
    font-size: smaller;
    background: var(--bg-color);
    color: var(--text-main);
    background-image: linear-gradient(to bottom, var(--bg-color-light), var(--bg-color));
    /* margin: 0; */
    margin: 5px 20px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;

}

.specialGothic{
    font-family: 'MyLocalFontText', sans-serif;
    font-size: 0.8rem;
    line-height: 0.8rem;
}

.container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    /* gap: 30px; */
    gap: 20px;
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

h1 {
    text-align: center;
    font-size: 1.8em;
    color: var(--accent);
    margin-bottom: 30px;
}

.search-box {
    width: 100%;
    padding: 12px;
    background: #202225;
    /* background: var(--primary); */
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    /* margin-top: 30px; */
    margin-top: 20px;
    box-sizing: border-box;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th {
    text-align: left;
    /* padding: 12px 8px; */
    padding: 12px 4px;
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
    text-transform: uppercase;
    /* font-size: 0.8rem; */
    font-family: 'MyLocalFontText', sans-serif;
    letter-spacing: 1px;
}

.ranking-table td {
    /* padding: 15px 8px; */
    /* padding: 10px 8px; */
    padding: 10px 4px;
    border-bottom: 1px solid #3e4147;
}

.row-table-ranking {
    transition: background 0.3s ease-out;
    cursor: default;
}

.row-table-ranking:hover {
    background: #4f5c6d;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.row-table-ranking:active {
    background: #618f6d;
    transform: scale(1);
    transition: all 0.3s ease;
}


.rank-pos {
    font-weight: bold;
    color: var(--text-dim);
    /* width: 40px; */
    text-align: center;
    width: 30px;
}

.song-title {
    font-weight: 500;
    font-family: 'MyLocalFontText', sans-serif;
    font-size: 0.9rem;
}

.song-meta {
    font-family: 'MyLocalFontText', sans-serif;
    font-size: 0.8rem;
    /* font-size: 0.75rem; */
    color: var(--text-dim);
    display: block;
    margin-top: 2px;
}

.rank-score {
    font-weight: 900;
    text-align: right;
    font-size: 1.1rem;
}

.rank-meta {
    /* font-size: 0.85rem; */
    /* color: var(--text-dim); */
    white-space: nowrap; /* Evita que la fecha ocupe dos líneas */
    max-width: 200px;
    text-align: center;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 25px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--accent);
}

.empty-msg {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
}




/* Sticky bar */
.ranking-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--bg-color-light); 
    /* border-bottom: 2px solid #d33535; */
    border-bottom: 2px solid var(--accent);
    padding: 10px 4px;
    /* margin-top: 20px; */
    /* box-shadow: 0 4px 6px rgba(0,0,0,0.3); */
    max-width: 100%;
}

.nav-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    padding: 0 10px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    
    /* Ocultar barra de scroll pero permitir funcionalidad */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.nav-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* Estilo de los Botones */
.nav-btn {
    background: #333;
    color: var(--text-dim);
    /* border: 1px solid #555; */
    border: none;
    padding: 8px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: 'MyLocalFont', sans-serif;
    font-size: smaller;
    
}

.nav-btn:hover {
    background: #444;
    color: #fff;
}

/* Estado Activo (Botón seleccionado) */
.nav-btn.active {
    background: var(--accent);
    color: #000;
    font-weight: bold;
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(211, 53, 53, 0.5);
}

.card {
    background: var(--card-bg);
    /* padding: 20px; */
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    /* position: relative; */
}

.logout-link {
    color: var(--danger);
    font-size: 0.9em;
    /* text-decoration: underline; */
    cursor: pointer;
    text-align: center;
    /* margin-top: 10px; */
    align-self: center;
}



/* Ajuste para móviles */
@media (max-width: 600px) {
    /* .nav-container {
        justify-content: flex-start;
    } */
}