/* sites/leyendas-river/style.css */

/* --- Design Tokens --- */
:root {
    --primary-red: #e30613;
    --primary-red-hover: #b8000a;
    --primary-black: #111111;
    --dark-grey: #2a2a2a;
    --light-grey: #f7f9fa;
    --border-grey: #e1e8ed;
    --white: #ffffff;
    
    /* SourcingUp Branding */
    --sourcingup-blue: #0d6efd;
    --sourcingup-blue-dark: #0b5ed7;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px rgba(227, 6, 19, 0.08);
    
    /* Fonts */
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Base resets & utilities --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--white);
    color: var(--primary-black);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--light-grey);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red-hover);
}

/* --- Header & Navbar --- */
.navbar-container {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-grey);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--light-grey);
    border: 2px solid var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-black);
    letter-spacing: -0.5px;
}

.logo-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary-red);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* --- Language Dropdown --- */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background-color: var(--light-grey);
    border: 1px solid var(--border-grey);
    padding: 0.6rem 1rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-black);
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--primary-red);
    background-color: var(--white);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    z-index: 1;
    border: 1px solid var(--border-grey);
    overflow: hidden;
    margin-top: 5px;
}

.dropdown-content a {
    color: var(--primary-black);
    padding: 10px 16px;
    display: block;
    font-size: 0.85rem;
    text-align: left;
}

.dropdown-content a:hover, .dropdown-content a.active {
    background-color: var(--light-grey);
    color: var(--primary-red);
    font-weight: 600;
}

.language-dropdown:hover .dropdown-content {
    display: block;
}

/* --- User profile & auth --- */
#auth-section {
    display: flex;
    align-items: center;
}

#user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--light-grey);
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    border: 1px solid var(--border-grey);
}

.user-profile-hide {
    display: none !important;
}

#user-picture {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary-red);
}

#user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--dark-grey);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding-left: 5px;
}

.btn-logout:hover {
    color: var(--primary-red);
}

/* --- Hero Section --- */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
    background: radial-gradient(circle at top, rgba(227, 6, 19, 0.04) 0%, transparent 70%);
}

.hero-tag {
    background-color: rgba(227, 6, 19, 0.08);
    color: var(--primary-red);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(227, 6, 19, 0.15);
}

.hero h1 {
    font-family: var(--font-headings);
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--primary-black);
    margin-bottom: 1rem;
}

.hero h1 span {
    color: var(--primary-red);
}

.hero p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--dark-grey);
    font-weight: 400;
}

/* --- Search & Filters --- */
.filters-section {
    margin-bottom: 3rem;
}

.search-box-container {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    position: relative;
    box-shadow: var(--shadow-md);
    border-radius: 40px;
}

.search-box-container i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-grey);
    font-size: 1.1rem;
}

.search-input {
    width: 100%;
    padding: 1.1rem 1.1rem 1.1rem 50px;
    border-radius: 40px;
    border: 1px solid var(--border-grey);
    outline: none;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.1);
}

.position-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--white);
    border: 1px solid var(--border-grey);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-black);
}

.filter-btn.active {
    background-color: var(--primary-black);
    color: var(--white);
    border-color: var(--primary-black);
}

/* --- Player Grid --- */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.player-card {
    background-color: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.player-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(227, 6, 19, 0.3);
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background-color: var(--primary-red);
    opacity: 0;
    transition: opacity 0.3s;
}

.player-card:hover::before {
    opacity: 1;
}

.card-header-info {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-grey);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.player-number {
    font-family: var(--font-headings);
    font-weight: 900;
    font-size: 2rem;
    color: rgba(227, 6, 19, 0.15);
    line-height: 1;
}

.player-badge-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
}

.position-badge {
    background-color: var(--light-grey);
    color: var(--primary-black);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-stamp-card {
    background-color: #fff2f2;
    color: var(--primary-red);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(227, 6, 19, 0.2);
}

.not-legend-stamp-card {
    background-color: var(--light-grey);
    color: var(--dark-grey);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.custom-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.badge-madrid {
    background: #000000;
    color: #ffffff;
    border: 1px solid #222222;
}

.badge-world {
    background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
    color: #1d4ed8;
    border: 1px solid rgba(29, 78, 216, 0.35);
}

.badge-libertadores {
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    color: #ea580c;
    border: 1px solid rgba(234, 88, 12, 0.35);
}

.card-body-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.player-name {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: var(--primary-black);
}

.player-years {
    font-size: 0.8rem;
    color: var(--dark-grey);
    margin-bottom: 1rem;
    font-weight: 500;
}

.player-mini-bio {
    font-size: 0.88rem;
    color: var(--dark-grey);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    border-top: 1px solid var(--border-grey);
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-val {
    display: block;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-black);
}

.stat-lbl {
    display: block;
    font-size: 0.65rem;
    color: var(--dark-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-footer-votes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-grey);
    padding: 1rem 1.5rem;
    background-color: var(--light-grey);
}

.votes-counter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-black);
}

.votes-counter i {
    color: var(--primary-red);
}

.btn-details {
    color: var(--primary-red);
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-details:hover {
    color: var(--primary-red-hover);
    transform: translateX(3px);
}

/* --- Details Page --- */
.details-wrapper {
    padding: 3rem 0 5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-grey);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

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

.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.details-main {
    background-color: var(--white);
}

.player-main-header {
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.player-main-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.player-main-title-row h1 {
    font-family: var(--font-headings);
    font-weight: 900;
    font-size: 3rem;
    letter-spacing: -1px;
    line-height: 1.1;
}

.player-main-subtitle-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark-grey);
    font-weight: 500;
}

.badge-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.details-section {
    margin-bottom: 2.5rem;
}

.details-section h2 {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-black);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-section h2 i {
    color: var(--primary-red);
    font-size: 1.2rem;
}

.details-section p {
    font-size: 1rem;
    color: var(--dark-grey);
    line-height: 1.7;
}

/* --- Details Sidebar --- */
.details-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background-color: var(--light-grey);
    border: 1px solid var(--border-grey);
    border-radius: 20px;
    padding: 2rem;
}

.sidebar-card h3 {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-grey);
    padding-bottom: 0.5rem;
}

.sidebar-stats-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.sidebar-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-stat-label {
    font-size: 0.85rem;
    color: var(--dark-grey);
    font-weight: 600;
}

.sidebar-stat-value {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary-black);
}

/* --- Voting Box --- */
.voting-box {
    background-color: var(--white);
    border: 2px solid var(--border-grey);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.voting-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-red);
}

.voting-title {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.voting-sub {
    font-size: 0.8rem;
    color: var(--dark-grey);
    margin-bottom: 1.5rem;
}

.voting-count-display {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.voting-count-display span {
    font-size: 1rem;
    color: var(--primary-black);
    font-weight: 500;
}

.btn-vote {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.2);
}

.btn-vote:hover:not(:disabled) {
    background-color: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(227, 6, 19, 0.3);
}

.btn-vote:active:not(:disabled) {
    transform: translateY(0);
}

.btn-vote:disabled {
    background-color: var(--border-grey);
    color: var(--dark-grey);
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Mercado Libre Affiliate Box --- */
.ml-affiliate-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ml-affiliate-card i {
    font-size: 2rem;
    color: #d97706;
}

.ml-link-btn {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ml-link-btn:hover {
    background-color: var(--primary-red-hover);
    transform: scale(1.02);
}

/* --- Toast notification --- */
.toast-msg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--primary-black);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 10000;
    font-size: 0.9rem;
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toast-msg.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-msg-success {
    border-left: 4px solid #10b981;
}

.toast-msg-error {
    border-left: 4px solid var(--primary-red);
}

/* --- Player Avatar (Initials) --- */
.player-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--white);
    flex-shrink: 0;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.player-avatar.pos-GK { background: linear-gradient(135deg, #71717a, #3f3f46); }
.player-avatar.pos-DEF { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.player-avatar.pos-MID { background: linear-gradient(135deg, #10b981, #047857); }
.player-avatar.pos-FWD { background: linear-gradient(135deg, var(--primary-red), #991b1b); }
.player-avatar.pos-COACH { background: linear-gradient(135deg, #6366f1, #4338ca); }

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

/* --- Category Voting Buttons --- */
.category-vote-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-cat {
    border: 2px solid var(--border-grey);
    background-color: var(--white);
    color: var(--primary-black);
    padding: 0.7rem 1rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-cat:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-cat:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-cat.selected {
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.btn-cat[data-cat="leyenda"] { border-color: #a1a1aa; }
.btn-cat[data-cat="leyenda"]:hover:not(:disabled),
.btn-cat[data-cat="leyenda"].selected { background-color: #71717a; color: #fff; }

.btn-cat[data-cat="idolo"] { border-color: #f87171; }
.btn-cat[data-cat="idolo"]:hover:not(:disabled),
.btn-cat[data-cat="idolo"].selected { background-color: var(--primary-red); color: #fff; }

.btn-cat[data-cat="crack"] { border-color: #60a5fa; }
.btn-cat[data-cat="crack"]:hover:not(:disabled),
.btn-cat[data-cat="crack"].selected { background-color: #3b82f6; color: #fff; }

.btn-cat[data-cat="querido"] { border-color: #fb923c; }
.btn-cat[data-cat="querido"]:hover:not(:disabled),
.btn-cat[data-cat="querido"].selected { background-color: #ea580c; color: #fff; }

.btn-cat[data-cat="normal"] { border-color: #a3a3a3; }
.btn-cat[data-cat="normal"]:hover:not(:disabled),
.btn-cat[data-cat="normal"].selected { background-color: #737373; color: #fff; }

.btn-cat[data-cat="olvidable"] { border-color: #d4d4d4; }
.btn-cat[data-cat="olvidable"]:hover:not(:disabled),
.btn-cat[data-cat="olvidable"].selected { background-color: #a3a3a3; color: #fff; }

/* --- Category Breakdown Bars --- */
.category-breakdown {
    margin-top: 1rem;
}

.breakdown-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
}

.breakdown-label {
    width: 90px;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}

.breakdown-bar-track {
    flex-grow: 1;
    height: 8px;
    background-color: var(--light-grey);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.cat-leyenda { background-color: #f59e0b; }
.cat-idolo { background-color: var(--primary-red); }
.cat-crack { background-color: #3b82f6; }
.cat-querido { background-color: #ea580c; }
.cat-normal { background-color: #737373; }
.cat-olvidable { background-color: #a3a3a3; }

.breakdown-count {
    width: 30px;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
}

/* --- Compact Footer --- */
.footer-compact {
    background-color: #000000;
    color: var(--white);
    padding: 0.8rem 0;
    margin-top: auto;
}

.footer-compact-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 400;
    gap: 1.5rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-credit {
    opacity: 0.9;
}

.footer-credit strong {
    font-weight: 700;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
}

.footer-logo-img {
    height: 28px; /* Slightly larger logo */
    width: auto;
    object-fit: contain;
    opacity: 0.95;
    transition: opacity 0.2s;
}

.footer-logo-img:hover {
    opacity: 1;
}

/* --- Language Dropdown in Footer --- */
.language-dropdown-footer {
    position: relative;
    display: inline-block;
}

.lang-btn-footer {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.9rem;
    border-radius: 20px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--white);
    transition: all 0.2s;
}

.lang-btn-footer:hover {
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.2);
}

.dropdown-content-footer {
    display: none;
    position: absolute;
    bottom: 100%; /* Opens UPWARDS */
    right: 0;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    z-index: 1000;
    border: 1px solid var(--border-grey);
    overflow: hidden;
    margin-bottom: 8px;
}

.dropdown-content-footer a {
    color: var(--primary-black);
    padding: 10px 16px;
    display: block;
    font-size: 0.85rem;
    text-align: left;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-content-footer a:hover,
.dropdown-content-footer a.active {
    background-color: var(--light-grey);
    color: var(--primary-red);
    font-weight: 600;
}

.language-dropdown-footer:hover .dropdown-content-footer {
    display: block;
}

/* --- Responsive Adaptations --- */
@media (max-width: 768px) {
    .navbar-content {
        height: auto;
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .player-main-title-row h1 {
        font-size: 2.2rem;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* --- Premium Editorial Classification Card Styles --- */

/* 1. Legends (Spectacular Platinum Silver & Deep Crimson Glossmorphism) */
.player-card.card-leyenda {
    border: 2px solid #d1d5db; /* Platinum/Silver base */
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 50%, #f3f4f6 100%);
    box-shadow: var(--shadow-sm), 0 0 20px rgba(227, 6, 19, 0.12), inset 0 0 15px rgba(227, 6, 19, 0.02);
}

.player-card.card-leyenda:hover {
    border-color: var(--primary-red);
    box-shadow: 0 18px 38px rgba(227, 6, 19, 0.25), 0 0 30px rgba(209, 213, 219, 0.6);
    transform: translateY(-10px);
}

.player-card.card-leyenda::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-red) 0%, #a1a1aa 100%);
    opacity: 1;
    transition: opacity 0.3s;
}

/* Legend Stamp */
.legend-stamp-card.stamp-leyenda {
    background: linear-gradient(135deg, var(--primary-red) 0%, #991b1b 100%);
    color: var(--white);
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 6px rgba(227, 6, 19, 0.3);
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* 2. Idols (Elegant Crimson Red Border, Soft Shadows) */
.player-card.card-idolo {
    border: 1.5px solid rgba(227, 6, 19, 0.55);
    box-shadow: var(--shadow-sm), 0 0 12px rgba(227, 6, 19, 0.06);
}

.player-card.card-idolo:hover {
    border-color: var(--primary-red);
    box-shadow: 0 14px 30px rgba(227, 6, 19, 0.18);
    transform: translateY(-8px);
}

.player-card.card-idolo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background-color: var(--primary-red);
    opacity: 0.85;
    transition: opacity 0.3s;
}

/* Idol Stamp */
.legend-stamp-card.stamp-idolo {
    background-color: #fff2f2;
    color: var(--primary-red);
    border: 1px solid rgba(227, 6, 19, 0.35);
    font-weight: 800;
}

/* 3. Forgettables (Dashed Grey Border, "Cancelled" Style with Opacity) */
.player-card.card-olvidable {
    border: 2px dashed #a3a3a3;
    background-color: #fafafa;
    opacity: 0.65;
    filter: grayscale(40%);
    box-shadow: none;
    transition: all 0.3s ease;
}

.player-card.card-olvidable:hover {
    opacity: 0.95;
    filter: grayscale(0%);
    border-color: #737373;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.player-card.card-olvidable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #a3a3a3;
    opacity: 0.5;
}

/* Forgettable Badge inside card badge container */
.player-card.card-olvidable .not-legend-stamp-card {
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-weight: 800;
}

/* Custom Forgettable Badge (Cucarda) */
.badge-olvidable {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border: 1px solid rgba(75, 85, 99, 0.35);
}

/* 4. Cracks (Clean Classic Design, Subtle Red Sash on Hover) */
.player-card.card-crack {
    border: 1px solid var(--border-grey);
}

.player-card.card-crack:hover {
    border-color: rgba(227, 6, 19, 0.25);
    box-shadow: var(--shadow-md);
}

.player-card.card-crack::before {
    background-color: rgba(227, 6, 19, 0.7);
}


/* --- Horizontal Voting Box & Vertical Chart --- */
.voting-box-horizontal {
    background-color: var(--white);
    border: 2px solid var(--border-grey);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.voting-box-horizontal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-red);
}

.voting-box-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-grey);
    padding-bottom: 1.5rem;
}

.voting-box-title-area h3 {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.voting-box-total {
    text-align: right;
}

.vote-total-number {
    font-family: var(--font-headings);
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--primary-red);
    line-height: 1;
}

.vote-total-label {
    font-size: 0.8rem;
    color: var(--dark-grey);
    font-weight: 600;
    text-transform: uppercase;
}

.voting-box-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

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

.category-vote-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vertical-chart-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 150px;
    padding-left: 1rem;
    border-left: 1px solid var(--border-grey);
}

@media (max-width: 768px) {
    .vertical-chart-container {
        border-left: none;
        border-top: 1px solid var(--border-grey);
        padding-left: 0;
        padding-top: 1.5rem;
    }
}

.vertical-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    width: 18%;
}

.vertical-bar-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.vertical-bar-track {
    width: 100%;
    background-color: var(--light-grey);
    border-radius: 6px;
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.breakdown-bar-fill-vertical {
    width: 100%;
    border-radius: 6px;
    transition: height 0.5s ease-out;
}

/* --- Player Avatar (Photo) --- */
.player-avatar-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

/* --- Single Column Player Detail Layout --- */
.details-grid-single {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Compact Player Stats Row (Directly below Voting Card) --- */
.player-stats-compact {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--light-grey);
    border: 1px solid var(--border-grey);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    margin: 1.5rem 0 2.5rem 0;
    box-shadow: var(--shadow-sm);
}

.stat-compact-item {
    text-align: center;
    flex: 1;
}

.stat-compact-item:not(:last-child) {
    border-right: 1px solid var(--border-grey);
}

.stat-compact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--dark-grey);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-compact-value {
    font-family: var(--font-headings);
    font-weight: 900;
    font-size: 2.2rem;
    color: var(--primary-black);
    line-height: 1.1;
}

/* --- Mercado Libre Premium Showcase (Bottom) --- */
.ml-products-section {
    background: linear-gradient(180deg, var(--white) 0%, var(--light-grey) 100%);
    border: 1px solid var(--border-grey);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 4rem;
    box-shadow: var(--shadow-sm);
}

.ml-products-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.ml-header-logo {
    height: 28px;
    object-fit: contain;
}

.ml-products-header h3 {
    font-family: var(--font-headings);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-black);
    letter-spacing: -0.5px;
}

.ml-products-subtitle {
    font-size: 0.95rem;
    color: var(--dark-grey);
    margin-bottom: 2rem;
}

.ml-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.ml-product-card {
    background-color: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-sm);
}

.ml-product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(227, 6, 19, 0.25);
}

.ml-product-image-container {
    height: 200px;
    background-color: var(--light-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-grey);
    position: relative;
    transition: background-color 0.2s;
}

.ml-product-card:hover .ml-product-image-container {
    background-color: #f1f5f9;
}

.retro-shirt-placeholder {
    font-size: 3.5rem;
    color: var(--primary-red);
    filter: drop-shadow(0 4px 6px rgba(227, 6, 19, 0.15));
}

.ml-product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ml-product-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-red);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.ml-product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-black);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ml-product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #eab308;
    margin-bottom: 1rem;
}

.ml-product-rating span {
    color: var(--dark-grey);
    margin-left: 0.35rem;
    font-weight: 500;
}

.ml-product-price {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-black);
    margin-bottom: 1.25rem;
    margin-top: auto;
}

.ml-product-buy-btn {
    background-color: #fff159; /* Authentic ML Yellow */
    color: #111111;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.ml-product-buy-btn:hover {
    background-color: #ffe81a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 241, 89, 0.3);
}

.ml-product-buy-btn:active {
    transform: translateY(0);
}

/* --- Responsive stats & products --- */
@media (max-width: 576px) {
    .player-stats-compact {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-compact-item:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border-grey);
        padding-bottom: 1.5rem;
        width: 100%;
    }

    .ml-products-section {
        padding: 1.5rem;
    }
}

/* ===========================================================
   UNIFIED VOTING WIDGET
   =========================================================== */

.voting-widget {
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.voting-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-grey);
    gap: 1rem;
}

.voting-widget-header h3.voting-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-black);
    margin: 0 0 0.2rem;
}

.voting-widget-header p.voting-sub {
    font-size: 0.82rem;
    color: var(--dark-grey);
    margin: 0;
}

.vote-total-badge {
    text-align: center;
    flex-shrink: 0;
}

.vote-total-badge .vote-total-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-red);
    font-family: var(--font-headings);
    line-height: 1;
}

.vote-total-badge .vote-total-label {
    font-size: 0.72rem;
    color: var(--dark-grey);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Each category row (legacy — kept for potential fallback) */
.voting-row-btn { display: none; } /* hidden, replaced by column grid */

/* ─────────────────────────────────────────────
   VOTE COLUMNS GRID  (desktop: 6 cols side by side)
   ───────────────────────────────────────────── */

.vote-cols-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 per line (2 rows total) */
    gap: 1.2rem 0.8rem; /* comfortable spacing between rows and columns */
    margin-bottom: 1.5rem;
    align-items: end; /* bars grow upward from baseline */
}

/* Each column container */
.vote-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

/* The clickable button (category name) */
.vote-col-btn {
    width: 100%;
    padding: 0.8rem 0.6rem;
    font-family: var(--font-body);
    font-size: 1.05rem; /* larger typography */
    font-weight: 700;
    color: var(--primary-black);
    background: var(--light-grey);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
    line-height: 1.2;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-col-btn:hover:not(:disabled) {
    background: rgba(227, 6, 19, 0.08);
    border-color: var(--primary-red);
    color: var(--primary-red);
    transform: translateY(-2px);
}

.vote-col-btn:disabled {
    cursor: default;
}

.vote-col-btn.selected {
    background: rgba(227, 6, 19, 0.12);
    border-color: var(--primary-red);
    color: var(--primary-red);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.15);
}

/* Winner column button (styled in elegant red) */
.winning-col .vote-col-btn {
    border-color: var(--primary-red);
    background: rgba(227, 6, 19, 0.05);
}

/* Fill background inside button */
.vote-col-bg-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(227, 6, 19, 0.25);
    z-index: 0;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vote-col-label, .vote-col-pct {
    position: relative;
    z-index: 1;
}

/* Category bar colors in shades of Red and neutral Greys */
.vote-col-bg-fill.cat-leyenda  { background: rgba(180, 0, 14, 0.80); } /* Deep Rich Red */
.vote-col-bg-fill.cat-idolo    { background: rgba(227, 6, 19, 0.60); } /* Classic River Red */
.vote-col-bg-fill.cat-crack    { background: rgba(227, 6, 19, 0.42); } /* Bright Red */
.vote-col-bg-fill.cat-querido  { background: rgba(255, 75, 75, 0.35); } /* Soft Rose Red */
.vote-col-bg-fill.cat-unomas   { background: rgba(160, 160, 160, 0.35); } /* Neutral Grey (Uno Más) */
.vote-col-bg-fill.cat-olvidable{ background: rgba(90, 90, 90, 0.45); } /* Slate Grey */

/* Winner bar gets a premium glowing RED gradient */
.winning-col .vote-col-bg-fill {
    background: linear-gradient(to right, #b4000e, #ff4d4d) !important;
}
.winning-col .vote-col-label, .winning-col .vote-col-pct {
    color: var(--white);
}

/* Percentage text */
.vote-col-pct {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dark-grey);
    font-variant-numeric: tabular-nums;
    margin-top: 0.2rem;
}

.winning-col .vote-col-pct {
    font-size: 1.1rem;
}

.user-voted-col .vote-col-pct, .user-voted-col .vote-col-label {
    color: var(--primary-red);
}

/* Leader badge below the % (Vibrant Red/White instead of Gold/Yellow) */
.vote-col-leader {
    font-size: 0.72rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e30613, #b4000e);
    color: #ffffff;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    margin-top: 0.2rem;
    box-shadow: 0 2px 6px rgba(227, 6, 19, 0.25);
}

.vote-col-leader-empty {
    background: transparent;
    color: transparent;
    pointer-events: none;
    min-height: 1.4em;  /* keeps grid rows aligned */
}

/* ─────────────────────────────────────────────
   RESPONSIVE: keep exactly 3 columns, adjust padding/text
   ───────────────────────────────────────────── */

@media (max-width: 680px) {
    .vote-cols-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem 0.5rem;
    }
    .vote-col-btn {
        font-size: 0.95rem;
        padding: 0.7rem 0.3rem;
    }
}

@media (max-width: 400px) {
    .vote-cols-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem 0.4rem;
    }
    .vote-col-btn {
        font-size: 0.85rem;
        padding: 0.6rem 0.2rem;
    }
    }
}


    font-size: 0.95rem;
    color: var(--primary-black);
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voting-row-pct {
    font-weight: 800;
    font-size: 1rem;
    color: var(--dark-grey);
    position: relative;
    z-index: 1;
    min-width: 3rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Winner / Leading row */
.voting-row-btn.winning-row {
    border-color: #c9a227;
    background: rgba(201, 162, 39, 0.06);
}

.voting-row-btn.winning-row .voting-row-fill {
    background: rgba(201, 162, 39, 0.18);
}

.voting-row-btn.winning-row .voting-row-pct {
    color: #a07800;
    font-weight: 900;
}

.winner-badge {
    background: linear-gradient(135deg, #f7c948, #d4a017);
    color: #5a3e00;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* User's voted row highlight */
.voting-row-btn.user-voted {
    border-color: var(--primary-red);
    background: rgba(227, 6, 19, 0.06);
}

.voting-row-btn.user-voted .voting-row-fill {
    background: rgba(227, 6, 19, 0.18);
}

.voting-row-btn.user-voted .voting-row-label {
    color: var(--primary-red);
}

.voting-row-btn.user-voted .voting-row-pct {
    color: var(--primary-red);
}

/* Olvidable row (slightly muted) */
.voting-row-btn[data-cat="olvidable"] .voting-row-fill {
    background: rgba(100, 100, 100, 0.12);
}

.voting-row-btn[data-cat="olvidable"].winning-row {
    border-color: #888;
}

/* ===========================================================
   LIKE BUTTON (anonymous)
   =========================================================== */

.like-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-grey);
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark-grey);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.like-btn i {
    color: #d0d0d0;
    font-size: 1.1rem;
    transition: color 0.2s, transform 0.2s;
}

.like-btn:hover {
    border-color: #e30613;
    color: #e30613;
}

.like-btn:hover i {
    color: #e30613;
}

.like-btn.liked {
    border-color: #e30613;
    color: #e30613;
    background: rgba(227, 6, 19, 0.05);
}

.like-btn.liked i {
    color: #e30613;
}

.like-btn.like-bounce i {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.4); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.like-count {
    font-variant-numeric: tabular-nums;
}

.like-hint {
    font-size: 0.78rem;
    color: var(--dark-grey);
    opacity: 0.7;
}

/* ===========================================================
   LOGIN MODAL (glassmorphism, appears only on vote click)
   =========================================================== */

.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.login-modal-overlay[hidden] {
    display: none;
}

.login-modal-overlay.modal-visible {
    opacity: 1;
    pointer-events: all;
}

.login-modal-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.login-modal-overlay.modal-visible .login-modal-card {
    transform: translateY(0);
}

.login-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-grey);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.login-modal-close:hover {
    color: var(--primary-red);
}

.login-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.login-modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-black);
    margin: 0 0 0.5rem;
}

.login-modal-subtitle {
    font-size: 0.9rem;
    color: var(--dark-grey);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.google-btn-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    min-height: 44px;
}

.login-modal-cancel {
    background: none;
    border: none;
    color: var(--dark-grey);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--font-body);
    transition: color 0.2s;
}

.login-modal-cancel:hover {
    color: var(--primary-red);
}

/* ===========================================================
   SHARE SECTION
   =========================================================== */

.share-section {
    padding: 1.5rem;
    background: var(--light-grey);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.share-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-black);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.share-x {
    background: #000;
    color: #fff;
}

.share-x:hover {
    background: #222;
    transform: translateY(-2px);
}

.share-fb {
    background: #1877f2;
    color: #fff;
}

.share-fb:hover {
    background: #0d6efd;
    transform: translateY(-2px);
}

.share-wa {
    background: #25d366;
    color: #fff;
}

.share-wa:hover {
    background: #1eb855;
    transform: translateY(-2px);
}

.share-copy {
    background: var(--white);
    color: var(--primary-black);
    border: 1.5px solid var(--border-grey);
}

.share-copy:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .share-buttons {
        gap: 0.5rem;
    }
    .share-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.9rem;
    }
}

/* ===========================================================
   COMMENTS SECTION
   =========================================================== */

.comments-section {
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.comments-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-black);
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-count-badge {
    background: var(--primary-red);
    color: #fff;
    border-radius: 50px;
    padding: 0.1rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Comment form */
.comment-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-grey);
}

.comment-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.comment-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-textarea {
    width: 100%;
    border: 1.5px solid var(--border-grey);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
    color: var(--primary-black);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 0.8rem;
    color: var(--dark-grey);
}

.comment-submit-btn {
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.2s, transform 0.15s;
}

.comment-submit-btn:hover {
    background: #b5000e;
    transform: translateY(-1px);
}

.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Login prompt inside comments */
.comment-login-prompt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--light-grey);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--dark-grey);
    flex-wrap: wrap;
}

.comment-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--white);
    border: 1.5px solid var(--border-grey);
    border-radius: 50px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
    color: var(--primary-black);
}

.comment-login-btn:hover {
    border-color: #4285f4;
    color: #4285f4;
}

/* Comment cards */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-grey);
}

.comment-card:last-child {
    border-bottom: none;
}

.comment-card.my-comment {
    background: rgba(227, 6, 19, 0.03);
    padding: 0.75rem;
    border-radius: 12px;
    border-bottom: none;
}

.comment-body {
    flex: 1;
}

.comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-black);
    margin-right: 0.5rem;
}

.comment-date {
    font-size: 0.78rem;
    color: var(--dark-grey);
}

.comment-text {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.55;
}

.no-comments-msg {
    color: var(--dark-grey);
    font-size: 0.9rem;
    text-align: center;
    padding: 1.5rem 0;
    margin: 0;
}

/* ===========================================================
   MERCADO LIBRE — CLEAN SEARCH LINKS (no fake images/prices)
   =========================================================== */

.ml-links-section {
    background: #fff9f0;
    border: 1px solid #ffe5b4;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.ml-links-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ml-links-tagline {
    font-size: 0.82rem;
    color: #78560a;
    font-weight: 600;
}

.ml-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

@media (max-width: 600px) {
    .ml-links-grid {
        grid-template-columns: 1fr;
    }
}

/* Each link card */
.ml-link-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    background: #fff;
    border: 1px solid #f3d28a;
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-black);
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.ml-link-card:hover {
    background: #fffbf2;
    border-color: #f5a623;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.15);
}

.ml-link-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 2.2rem;
    text-align: center;
}

.ml-link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.ml-link-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-link-desc {
    font-size: 0.76rem;
    color: var(--dark-grey);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-link-arrow {
    font-size: 0.75rem;
    color: #f5a623;
    flex-shrink: 0;
    opacity: 0.8;
}


.ml-link-card:hover .ml-link-arrow {
    opacity: 1;
}

/* ─── Quick Vote on Player Cards (List Page) ──────────────── */
.card-quick-vote {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px 12px 10px;
    background: rgba(0,0,0,0.025);
    border-top: 1px solid var(--border-grey);
    align-items: stretch;
}

.card-vote-label {
    grid-column: 1 / -1;
    font-size: 0.63rem;
    color: var(--dark-grey);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 2px;
    opacity: 0.6;
}

.qv-btn {
    font-size: 0.75rem;
    padding: 6px 4px;
    border-radius: 8px;
    border: 1.5px solid;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.15s ease;
    white-space: nowrap;
    background: transparent;
    font-family: inherit;
    line-height: 1.4;
}

.qv-leyenda   { border-color: #7b0000; color: #7b0000; }
.qv-idolo     { border-color: #9b0000; color: #9b0000; }
.qv-crack     { border-color: #b8000a; color: #b8000a; }
.qv-querido   { border-color: #e30613; color: #e30613; }
.qv-unomas    { border-color: #888888; color: #888888; }
.qv-olvidable { border-color: #444444; color: #444444; }

.qv-btn:hover:not(:disabled) {
    opacity: 0.75;
    transform: scale(1.06);
}

.qv-btn:disabled {
    opacity: 0.3;
    cursor: default;
    transform: none;
}

.qv-btn.qv-voted {
    opacity: 1 !important;
    box-shadow: 0 0 0 2px currentColor;
    background: currentColor;
    color: #fff !important;
}



/* Responsive Text for Filters */
.mobile-text { display: none; }
@media (max-width: 768px) {
    .mobile-text { display: inline; }
    .desktop-text { display: none; }
}

/* Floating Share Button */
.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-red);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1000;
    border: none;
    transition: transform 0.2s, background-color 0.2s;
}
.floating-btn:hover {
    transform: scale(1.1);
    background-color: #c90000;
}

/* Deck UI CSS (Tinder-style) */
.deck-card {
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 550px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
    background: #222;
    transform-origin: center bottom;
    will-change: transform, opacity;
}

.deck-card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    position: relative;
}

.deck-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.deck-card-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.deck-card-info h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 5px 0;
    line-height: 1.1;
}

.deck-card-info p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
}

.fallback-deck-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    font-weight: 900;
    color: rgba(255,255,255,0.2);
}

/* Voting Buttons for Deck */
.deck-vote-btn {
    flex: 1 1 30%;
    border: none;
    border-radius: 12px;
    padding: 15px 10px;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.deck-vote-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.deck-vote-btn:active {
    transform: translateY(2px);
}

/* Animations */
@keyframes popIn {
    0% { transform: scale(0.8) translateY(50px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes swipeOut {
    0% { transform: translateX(0) rotate(0deg); opacity: 1; }
    100% { transform: translateX(100%) rotate(15deg); opacity: 0; }
}

.pop-in {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.swipe-out {
    animation: swipeOut 0.4s ease-in forwards;
}

/* Responsive adjustments */
@media (max-height: 700px) {
    .deck-card {
        max-height: 400px;
    }
    .deck-vote-btn {
        padding: 10px 5px;
        font-size: 1.2rem;
    }
}

/* Hide desktop actions on mobile and hide bottom nav on desktop */
@media (max-width: 768px) {
    .desktop-only-actions {
        display: none !important;
    }
    body {
        padding-bottom: 65px; /* Space for bottom nav bar */
    }
    .navbar-content {
        height: 50px !important;
        padding: 5px 15px !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    .navbar-container {
        padding: 0 !important;
        min-height: auto !important;
    }
}
@media (min-width: 769px) {
    .bottom-nav-bar {
        display: none !important;
    }
}

/* Bottom Navigation Bar */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.bottom-nav-bar .nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    gap: 4px;
    transition: color 0.2s, transform 0.2s;
    height: 100%;
    font-family: 'Outfit', sans-serif;
    outline: none;
}

.bottom-nav-bar .nav-tab i {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.bottom-nav-bar .nav-tab:hover,
.bottom-nav-bar .nav-tab.active {
    color: var(--primary-red);
}

.bottom-nav-bar .nav-tab.active i {
    transform: scale(1.15);
    color: var(--primary-red);
}

/* Hide floating share button */
#floating-share-btn {
    display: none !important;
}

/* Drawer Menu (Hamburger slide-over) */
.drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: flex-end;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.drawer-overlay.active {
    display: flex !important;
    opacity: 1;
}

.drawer-content {
    width: 85%;
    max-width: 340px;
    height: 100%;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInLeft {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-grey);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-black);
    font-family: 'Outfit', sans-serif;
}

.drawer-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.drawer-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.drawer-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.lang-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.lang-option {
    padding: 10px 6px;
    background: #f8f8f8;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-black);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.lang-option.active {
    background: #fff5f5;
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.about-section {
    background: #fafafa;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #444;
}

.about-section a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: bold;
}

.btn-contact-ia {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-black);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
    text-align: center;
    font-family: 'Outfit', sans-serif;
}

.btn-contact-ia:hover {
    background: #222;
    transform: translateY(-1px);
}

/* Filter Popup elements */
.btn-filter-popup {
    background: #f8f8f8;
    border: 1px solid rgba(0,0,0,0.06);
    color: var(--primary-black);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.btn-filter-popup:hover {
    background: #eee;
    transform: translateY(-1px);
}

.filter-modal-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 1.5rem 0;
}

.btn-filter-option {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #f0f0f0;
    background: white;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-black);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Outfit', sans-serif;
}

.btn-filter-option:hover {
    border-color: #ddd;
    background: #fafafa;
}

.btn-filter-option.active {
    border-color: var(--primary-red);
    background: #fff5f5;
    color: var(--primary-red);
}

.btn-filter-option.active::after {
    content: "✓";
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary-red);
}
