/* ================================================
   BINGU Online - Global CSS
   Reset, variables, body, header, footer, form components
   ================================================ */

/* ===== RESET + VARIABLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --blue: #1abcf5;
    --blue-dark: #0ea5db;
    --pink: #ff1dba;
    --pink-dark: #e6109f;
    --white: #ffffff;
    --gray: #6b7280;
    --gray-light: #f8fafc;
    --gray-dark: #1f2937;
    --bg: #f8fafc;
    --green: #22c55e;
    --red: #ef4444;

    /* Tipografía — Nunito, escala lectura fácil */
    --font-family: 'Nunito', sans-serif;
    --text-3xl: clamp(1.75rem, 4.5vw, 2.6rem);
    --text-2xl: clamp(1.35rem, 3.5vw, 1.85rem);
    --text-xl: clamp(1.1rem, 2vw, 1.3rem);
    --text-lg: clamp(1rem, 1.5vw, 1.15rem);
    --text-base: clamp(0.95rem, 1.3vw, 1.05rem);
    --text-sm: clamp(0.875rem, 1.2vw, 0.95rem);
    --text-xs: clamp(0.8rem, 1.1vw, 0.875rem);
    --text-price: clamp(1.4rem, 3vw, 2.2rem);
}

/* ===== BODY ===== */
body {
    font-family: var(--font-family);
    background: var(--white);
    color: var(--gray-dark);
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.01em;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
.header-wrapper {
    position: relative;
    z-index: 50;
    overflow: visible;
    margin-bottom: 28px;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -28px;
    background: linear-gradient(135deg, #0a4d8c 0%, #0c7ec4 20%, #0ea5e9 45%, #2dd4f0 70%, #0b9fd4 100%);
    background-size: 250% 250%;
    animation: headerGradient 10s ease infinite;
    z-index: -1;
}

@keyframes headerGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating bingo balls background */
.header-balls-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -28px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.header-bg-ball {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    filter: blur(0.5px);
    pointer-events: none;
    animation: bgBallLife 4s ease-in-out forwards;
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.12), 0 0 12px rgba(255,255,255,0.08);
}

.header-bg-ball::before {
    content: '';
    position: absolute;
    top: 26%;
    left: 6%;
    right: 6%;
    height: 42%;
    background: rgba(255,255,255,0.22);
    border-radius: 50%;
}

.header-bg-ball::after {
    content: '';
    position: absolute;
    top: 8%;
    left: 22%;
    width: 30%;
    height: 18%;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: rotate(-25deg);
}

.header-bg-ball span {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    color: rgba(255,255,255,0.85);
    z-index: 1;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

@keyframes bgBallLife {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    12% { opacity: 0.28; transform: translateY(-5px) scale(1); }
    40% { opacity: 0.25; transform: translateY(-14px) scale(1.02); }
    75% { opacity: 0.15; transform: translateY(-25px) scale(0.97); }
    100% { opacity: 0; transform: translateY(-35px) scale(0.88); }
}

@media (max-width: 599px) {
    .header-balls-container { display: none; }
}

.header-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0) 25%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 75%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmerLine 4s linear infinite;
    z-index: 20;
}

@keyframes shimmerLine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 40%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 60%, rgba(45,212,240,0.12) 0%, transparent 40%),
        radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 22px 22px;
    pointer-events: none;
}

.main-header {
    position: relative;
    padding: 12px 24px 20px;
    overflow: visible;
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 10;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: 14px;
    font-size: var(--text-base);
    font-weight: 600;
    color: #0c4a6e;
    text-decoration: none;
    transition: all 0.15s;
    background: linear-gradient(to bottom, #ffffff 0%, #eef4fb 100%);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow:
        0 4px 0 rgba(7,89,133,0.45),
        0 6px 12px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.9);
    position: relative;
    top: 0;
}

.nav-link:hover {
    color: #0284c7;
    top: 2px;
    box-shadow:
        0 2px 0 rgba(7,89,133,0.5),
        0 3px 6px rgba(0,0,0,0.08);
}

.nav-link:active {
    top: 4px;
    box-shadow:
        0 0px 0 rgba(7,89,133,0.5),
        0 1px 3px rgba(0,0,0,0.05);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-youtube {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to bottom, #ff4444, #dc2626) !important;
    color: var(--white) !important;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 14px;
    box-shadow:
        0 4px 0 #991b1b,
        0 6px 10px rgba(220,38,38,0.25) !important;
}

.nav-youtube .yt-play {
    fill: #dc2626;
}

.nav-youtube:hover {
    color: var(--white);
    top: 2px;
    box-shadow:
        0 2px 0 #991b1b,
        0 3px 6px rgba(220,38,38,0.2) !important;
}

.nav-youtube:active {
    top: 4px;
    box-shadow:
        0 0px 0 #991b1b,
        0 1px 3px rgba(220,38,38,0.15) !important;
}

.nav-premium {
    background: linear-gradient(to bottom, #fb923c, #ea580c) !important;
    color: var(--white) !important;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 14px;
    box-shadow:
        0 4px 0 #9a3412,
        0 6px 10px rgba(234,88,12,0.3) !important;
}

.nav-premium:hover {
    top: 2px;
    box-shadow:
        0 2px 0 #9a3412,
        0 3px 6px rgba(234,88,12,0.2) !important;
}

.nav-premium:active {
    top: 4px;
    box-shadow:
        0 0px 0 #9a3412,
        0 1px 3px rgba(234,88,12,0.15) !important;
}

.nav-register {
    background: linear-gradient(to bottom, #ff5dd0, var(--pink)) !important;
    color: var(--white) !important;
    font-weight: 600;
    padding: 10px 22px;
    box-shadow:
        0 4px 0 #a8126e,
        0 6px 10px rgba(255,29,186,0.25) !important;
}

.nav-register:hover {
    top: 2px;
    box-shadow:
        0 2px 0 #a8126e,
        0 3px 6px rgba(255,29,186,0.2) !important;
}

.nav-register:active {
    top: 4px;
    box-shadow:
        0 0px 0 #a8126e,
        0 1px 3px rgba(255,29,186,0.15) !important;
}

/* tooltips → moved to components.css */

.header-logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.3s;
    position: relative;
}

.header-logo-glow {
    position: absolute;
    width: 220px;
    height: 90px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.08) 40%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.header-logo-container:hover {
    transform: scale(1.05);
}

.header-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3)) brightness(1.1);
    transition: transform 0.3s, filter 0.3s;
    transform: scale(1.15);
    transform-origin: left center;
}

.header-logo-container:hover .header-logo {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)) brightness(1.15);
    transform: scale(1.15) rotate(-2deg);
}

/* Bingo ball decorations */
.header-ball {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-ball::before {
    content: '';
    position: absolute;
    top: 28%;
    left: 8%;
    right: 8%;
    height: 38%;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
}

.header-ball span {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    color: rgba(255,255,255,0.9);
    z-index: 1;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ball-b {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 35% 35%, #60a5fa, #2563eb);
    top: 12%;
    left: 5%;
    opacity: 0.4;
    animation: floatBall 5s ease-in-out infinite;
}
.ball-b span { font-size: 15px; }

.ball-i {
    width: 28px;
    height: 28px;
    background: radial-gradient(circle at 35% 35%, #f87171, #dc2626);
    top: 55%;
    left: 17%;
    opacity: 0.35;
    animation: floatBall 6s ease-in-out infinite 1s;
}
.ball-i span { font-size: 12px; }

.ball-n {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.85), rgba(200,220,240,0.65));
    top: 28%;
    left: 34%;
    opacity: 0.22;
    animation: floatBall 7s ease-in-out infinite 0.5s;
}
.ball-n span { font-size: 10px; color: rgba(80,110,140,0.8); }

.ball-g {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 35% 35%, #4ade80, #16a34a);
    top: 20%;
    right: 8%;
    opacity: 0.35;
    animation: floatBall 5.5s ease-in-out infinite 1.5s;
}
.ball-g span { font-size: 13px; }

.ball-o {
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at 35% 35%, #fdba74, #ea580c);
    top: 60%;
    right: 14%;
    opacity: 0.35;
    animation: floatBall 6.5s ease-in-out infinite 0.8s;
}
.ball-o span { font-size: 10px; }

@keyframes floatBall {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(5deg); }
    50% { transform: translateY(-4px) rotate(-3deg); }
    75% { transform: translateY(-12px) rotate(2deg); }
}

/* Header wave bottom */
.header-wave {
    position: absolute;
    bottom: -28px;
    left: 0;
    width: 100%;
    height: 35px;
    z-index: 2;
    pointer-events: none;
    display: block;
}

/* User section en header */
.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* User dropdown */
.user-dropdown-wrapper {
    position: relative;
    z-index: 100;
}

.nav-user {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 6px;
    font-family: inherit;
    cursor: pointer;
}

.user-chevron {
    color: var(--gray);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.nav-user[aria-expanded="true"] .user-chevron {
    transform: rotate(180deg);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pink);
    margin: -4px 0;
}

.user-avatar-initial {
    background: linear-gradient(135deg, var(--pink), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: var(--text-xs);
}

.user-name {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Animated border for premium users */
.nav-user-premium {
    background: var(--white) !important;
    border: 2px solid transparent;
    background-clip: padding-box !important;
    position: relative;
}

.nav-user-premium::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--pink), var(--blue), #a855f7, var(--pink));
    background-size: 300% 300%;
    animation: premiumBorder 3s linear infinite;
    z-index: -1;
}

.nav-user-premium::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: var(--white);
    z-index: -1;
}

@keyframes premiumBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nav-user-premium:hover {
    color: var(--gray-dark);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animated border on dropdown for premium */
.user-dropdown-has-plan {
    border: 2px solid transparent;
    background: var(--white);
    background-clip: padding-box;
}

.user-dropdown-has-plan::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--pink), var(--blue), #a855f7, var(--pink));
    background-size: 300% 300%;
    animation: premiumBorder 3s linear infinite;
    z-index: -1;
}

.user-dropdown-has-plan::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: var(--white);
    z-index: -1;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Plan badge inside dropdown */
.user-dropdown-plan {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    font-size: var(--text-sm);
    font-weight: 700;
    background: linear-gradient(135deg, #fdf2f8, #eff6ff);
    color: var(--gray-dark);
    border-bottom: 1px solid #e5e7eb;
    border-radius: 16px 16px 0 0;
}

.user-dropdown-plan svg {
    color: var(--pink);
    flex-shrink: 0;
}

.user-dropdown-noplan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.user-dropdown-noplan-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray);
    white-space: nowrap;
}

.user-dropdown-noplan-status svg {
    color: var(--gray);
    flex-shrink: 0;
}

.user-dropdown-noplan-cta {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #6366f1);
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.user-dropdown-noplan-cta:hover {
    opacity: 0.85;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-dark);
    text-decoration: none;
    transition: background 0.15s;
}

.user-dropdown-item:hover {
    background: var(--gray-light);
}

.user-dropdown-item svg {
    flex-shrink: 0;
    color: var(--gray);
}

.user-dropdown-item:hover svg {
    color: var(--blue);
}

.user-dropdown-logout {
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
}

.user-dropdown-logout:hover {
    color: var(--red);
}

.user-dropdown-logout:hover svg {
    color: var(--red);
}

/* ===== HAMBURGER BUTTON ===== */
.nav-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    top: 0;
    box-shadow:
        0 4px 0 #d1d5db,
        0 6px 10px rgba(0,0,0,0.1);
    transition: top 0.1s;
    flex-shrink: 0;
    z-index: 60;
}

.nav-hamburger:active {
    top: 4px;
    box-shadow:
        0 0px 0 #d1d5db,
        0 1px 3px rgba(0,0,0,0.05);
}

.hamburger-bar {
    display: block;
    width: 20px;
    height: 2.5px;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
    left: 11px;
}

.hamburger-bar:nth-child(1) { top: 12px; }
.hamburger-bar:nth-child(2) { top: 19.5px; }
.hamburger-bar:nth-child(3) { top: 27px; }

.nav-hamburger.active .hamburger-bar:nth-child(1) {
    top: 19.5px;
    transform: rotate(45deg);
}

.nav-hamburger.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active .hamburger-bar:nth-child(3) {
    top: 19.5px;
    transform: rotate(-45deg);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #f9d4ea, #d4eeff);
    padding: 16px 20px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 55;
}

.mobile-menu.active {
    display: block;
    animation: slideDown 0.25s ease-out;
}

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

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 14px;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    background: white;
    border: none;
    position: relative;
    top: 0;
    box-shadow:
        0 4px 0 #d1d5db,
        0 6px 10px rgba(0,0,0,0.08);
    transition: top 0.1s;
}

.mobile-menu-link:active {
    top: 4px;
    box-shadow:
        0 0px 0 #d1d5db,
        0 1px 3px rgba(0,0,0,0.05);
}

.mobile-menu-link.mobile-premium {
    background: linear-gradient(to bottom, #2dd4f0, #3b82f6);
    color: white;
    box-shadow:
        0 4px 0 #1e5fb3,
        0 6px 10px rgba(59,130,246,0.2);
}

.mobile-menu-link.mobile-premium:active {
    box-shadow:
        0 0px 0 #1e5fb3,
        0 1px 3px rgba(59,130,246,0.1);
}

.mobile-menu-link.mobile-register {
    background: linear-gradient(to bottom, #f472b6, #ec4899);
    color: white;
    box-shadow:
        0 4px 0 #be185d,
        0 6px 10px rgba(236,72,153,0.2);
}

.mobile-menu-link.mobile-register:active {
    box-shadow:
        0 0px 0 #be185d,
        0 1px 3px rgba(236,72,153,0.1);
}

.mobile-menu-link.mobile-youtube {
    background: linear-gradient(to bottom, #ff4444, #dc2626);
    color: white;
    box-shadow:
        0 4px 0 #991b1b,
        0 6px 10px rgba(220,38,38,0.2);
}

.mobile-menu-link.mobile-youtube:active {
    box-shadow:
        0 0px 0 #991b1b,
        0 1px 3px rgba(220,38,38,0.1);
}

.mobile-menu-link.mobile-youtube svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mobile-menu-link.mobile-youtube .yt-play {
    fill: #dc2626;
}

.mobile-menu-link.mobile-logout {
    background: rgba(255,255,255,0.9);
    color: #6b7280;
    font-weight: 500;
    box-shadow:
        0 4px 0 #d1d5db,
        0 6px 10px rgba(0,0,0,0.06);
}

.mobile-menu-link.mobile-logout:active {
    box-shadow:
        0 0px 0 #d1d5db,
        0 1px 3px rgba(0,0,0,0.05);
}

/* ===== HEADER RESPONSIVE ===== */
@media (min-width: 768px) {
    .main-header {
        padding: 14px 40px 24px;
    }

    .header-logo {
        width: 150px;
    }

    .nav-link {
        padding: 12px 22px;
        font-size: var(--text-base);
    }
}

@media (min-width: 1024px) {
    .main-header {
        padding: 16px 60px 28px;
    }

    .header-logo {
        width: 160px;
    }
}

/* --- Mobile: < 480px (hamburger menu) --- */
@media (max-width: 479px) {
    .main-header {
        padding: 10px 12px 14px;
    }

    .header-logo {
        width: 120px;
    }

    .header-nav {
        display: none;
    }

    .user-section {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .header-ball {
        display: none;
    }
}

/* --- Mobile M: 480-599px --- */
@media (min-width: 480px) and (max-width: 599px) {
    .main-header {
        padding: 10px 14px 16px;
    }

    .header-logo {
        width: 90px;
    }

    .header-nav {
        gap: 2px;
    }

    /* Ocultar Inicio */
    .header-nav .nav-link:first-child {
        display: none;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: var(--text-xs);
    }

    .nav-premium {
        padding: 8px 16px !important;
        font-size: var(--text-xs);
    }

    .nav-register {
        padding: 8px 16px !important;
        font-size: var(--text-xs);
    }

    .user-section {
        gap: 6px;
    }

    /* Compactar: solo iconos, sin texto */
    .nav-youtube { padding: 8px 10px !important; font-size: 0 !important; gap: 0 !important; }
    .nav-youtube .nav-icon { width: 18px; height: 18px; }

    .nav-user { padding: 6px !important; gap: 6px !important; }
    .user-name { display: none; }
    .user-chevron { display: none; }
    .user-avatar { width: 32px; height: 32px; }

    .header-ball {
        display: none;
    }
}

/* --- Tablet S: 600-767px --- */
@media (min-width: 600px) and (max-width: 767px) {
    .main-header {
        padding: 12px 18px 18px;
    }

    .header-logo {
        width: 110px;
    }

    .header-nav {
        gap: 4px;
    }

    .nav-link {
        padding: 9px 12px;
        font-size: var(--text-sm);
    }

    .nav-premium {
        padding: 9px 18px !important;
        font-size: var(--text-sm);
    }

    .nav-register {
        padding: 9px 18px !important;
        font-size: var(--text-sm);
    }

    .user-section {
        gap: 8px;
    }

    /* Compactar: solo iconos, sin texto */
    .nav-youtube { padding: 9px 12px !important; font-size: 0 !important; gap: 0 !important; }
    .nav-youtube .nav-icon { width: 19px; height: 19px; }

    .nav-user { padding: 6px !important; gap: 6px !important; }
    .user-name { display: none; }
    .user-chevron { display: none; }
    .user-avatar { width: 34px; height: 34px; }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gray-dark);
    color: #9ca3af;
    font-size: var(--text-sm);
    padding-left: 24px;
    padding-right: 24px;
}

.footer-top {
    height: 3px;
    background: linear-gradient(90deg, #0b7bb5, #2dd4f0, #0b7bb5);
    margin: 0 -24px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(30px, 5vw, 50px) 0 clamp(20px, 3vw, 30px);
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: clamp(24px, 4vw, 50px);
}

.footer-logo {
    width: clamp(100px, 12vw, 140px);
    margin-bottom: 12px;
}

.footer-tagline {
    color: #d1d5db;
    font-size: var(--text-sm);
    line-height: 1.5;
    margin-bottom: 10px;
}

.footer-disclaimer {
    font-size: var(--text-xs);
    color: #6b7280;
    line-height: 1.4;
}

.footer-heading {
    color: #f3f4f6;
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
    font-size: var(--text-sm);
}

.footer-links a:hover {
    color: #2dd4f0;
}

/* --- Selector de idioma --- */
.footer-lang {
    margin-top: 16px;
    position: relative;
}

.footer-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #d1d5db;
    font-family: var(--font-family);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.footer-lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.footer-lang-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.footer-lang-chevron {
    transition: transform 0.2s;
}

.footer-lang-btn[aria-expanded="true"] .footer-lang-chevron {
    transform: rotate(180deg);
}

.footer-lang-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #2d3748;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px 0;
    min-width: 160px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
    list-style: none;
    z-index: 50;
}

.footer-lang-dropdown.active {
    display: block;
}

.footer-lang-dropdown li {
    padding: 8px 16px;
    cursor: pointer;
    font-size: var(--text-xs);
    color: #d1d5db;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-lang-dropdown li:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--blue);
}

/* --- Bottom bar --- */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 20px;
    text-align: center;
}

.footer-bottom p {
    color: #6b7280;
    font-size: var(--text-xs);
}

/* --- Footer responsive (paddings en .footer, igual que .main-header) --- */
@media (min-width: 768px) {
    .footer {
        padding-left: 40px;
        padding-right: 40px;
    }
    .footer-top { margin: 0 -40px; }
}

@media (min-width: 1024px) {
    .footer {
        padding-left: 60px;
        padding-right: 60px;
    }
    .footer-top { margin: 0 -60px; }
}

@media (max-width: 767px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .footer-links {
        align-items: center;
    }

    .footer-lang {
        display: flex;
        justify-content: center;
    }

    .footer-lang-dropdown {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 479px) {
    .footer {
        padding-left: 12px;
        padding-right: 12px;
    }
    .footer-top { margin: 0 -12px; }
}

@media (min-width: 480px) and (max-width: 599px) {
    .footer {
        padding-left: 14px;
        padding-right: 14px;
    }
    .footer-top { margin: 0 -14px; }
}

@media (min-width: 480px) and (max-width: 767px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* ===== MESSAGES ===== */
.error-message {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: var(--text-sm);
    margin-bottom: 20px;
    border: 1px solid #fecaca;
}

.success-message {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #166534;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: var(--text-sm);
    margin-bottom: 20px;
    border: 1px solid #bbf7d0;
}

/* btn-submit, divider, btn-google → moved to components.css */
