/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Tablets y móviles grandes */
@media (max-width: 768px) and (min-width: 481px) {
    .discover-container {
        padding: 1.25rem;
        padding-bottom: calc( env(safe-area-inset-bottom, 0px) + 6.5rem );
        min-height: calc(100vh - 140px);
    }
    .cards-stack {
        width: min(520px, 92vw);
        height: min(68vh, 520px);
        margin-bottom: 1rem;
    }
    .swipe-actions {
        position: fixed;
        left: 0; right: 0;
        bottom: calc( env(safe-area-inset-bottom, 0px) + 14px );
        margin: 0 auto;
        padding: 0 24px;
        justify-content: center;
        gap: 1.25rem;
        z-index: 1000;
    }
}

/* Pantallas con poca altura (evitar que los botones queden fuera) */
@media (max-height: 700px) {
    .discover-container { padding-bottom: calc( env(safe-area-inset-bottom, 0px) + 6rem ); }
    .cards-stack { height: min(56vh, 360px); }
}

/* ===================== Favoritos: CTA Enviar Mensaje ===================== */
.send-favorite-msg-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: .2px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.send-favorite-msg-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.15);
    border-color: var(--border-color);
}
.send-favorite-msg-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* ===================== Modal Confirmación Diamantes ===================== */
.diamond-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,12,26,0.55);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3004;
}
.diamond-confirm-overlay[aria-hidden="false"] { display: flex; }

.diamond-confirm-dialog {
    width: min(92vw, 520px);
    background: linear-gradient(180deg, #1d1f36, #14162b);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.45);
    color: #fff;
    padding: 14px 16px;
}
.diamond-confirm-title {
    font-weight: 800;
    margin-bottom: 6px;
}
.diamond-confirm-text {
    color: #cfd3ff;
    opacity: .95;
}
.diamond-confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}
.btn-diamond-ok, .btn-diamond-cancel {
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border: 1px solid var(--border-color);
}
.btn-diamond-ok {
    background: linear-gradient(180deg, #16b5d8, #0fa1bf);
    color: #fff;
}
.btn-diamond-ok:hover { filter: brightness(1.05); }
.btn-diamond-cancel {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}
.btn-diamond-cancel:hover { background: rgba(255,255,255,0.13); }

/* ===================== Barras de búsqueda grandes (centradas) ===================== */
.search-bar-large {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0 14px;
    width: 100%;
}
.search-input-large {
    width: min(540px, 92vw);
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: box-shadow .18s ease, transform .12s ease, background .18s ease, border-color .18s ease;
    -webkit-appearance: none;
    appearance: none;
    /* Icono de lupa a la izquierda */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cfd3ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 18px 18px;
    padding-left: 42px;
}
.search-input-large::-webkit-search-decoration,
.search-input-large::-webkit-search-cancel-button,
.search-input-large::-webkit-search-results-button,
.search-input-large::-webkit-search-results-decoration { display: none; }
.search-input-large::placeholder { color: var(--text-secondary); opacity: .85; }
.search-input-large:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.22);
    border-color: rgba(103,126,234,0.45);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #0a0a0f;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --shadow-glow: 0 8px 32px rgba(31, 38, 135, 0.37);
    --diamond-color: #ffd700;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Botón corona flotante */
.crown-btn {
    background: var(--glass-bg);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px 0 rgba(255,215,0,0.18), var(--shadow-glow);
    padding: 10px 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s cubic-bezier(.4,2,.6,1), box-shadow 0.2s;
    cursor: pointer;
    outline: none;
    position: relative;
    z-index: 2;
}
.crown-btn svg {
    filter: drop-shadow(0 0 6px #ffe066);
}

.crown-emoji {
    display: inline-block;
    animation: crownBounce 2.2s cubic-bezier(.4,2,.6,1) infinite, crownShine 3.5s ease-in-out infinite;
    filter: drop-shadow(0 0 6px #ffe066);
    will-change: transform, filter;
}
@keyframes crownBounce {
    0% { transform: translateY(0) scale(1) rotate(-8deg); }
    20% { transform: translateY(-7px) scale(1.08) rotate(7deg); }
    40% { transform: translateY(0) scale(1) rotate(-6deg); }
    60% { transform: translateY(-4px) scale(1.04) rotate(5deg); }
    80% { transform: translateY(0) scale(1) rotate(-4deg); }
    100% { transform: translateY(0) scale(1) rotate(-8deg); }
}
@keyframes crownShine {
    0%, 100% { filter: drop-shadow(0 0 8px #ffe066) brightness(1); }
    50% { filter: drop-shadow(0 0 18px #fff7b2) brightness(1.18); }
}

.floating-crown {
    animation: crownFloat 2.2s ease-in-out infinite alternate;
}
@keyframes crownFloat {
    from { transform: translateY(0px) scale(1); }
    to { transform: translateY(-7px) scale(1.05); }
}
.crown-btn:hover, .crown-btn:focus {
    box-shadow: 0 6px 32px 0 #ffd70088, 0 0 0 2px #ffd70077, var(--shadow-glow);
    transform: translateY(-2px) scale(1.08);
}

/* Botón verificado junto a la corona */
/* Verified button = contenedor gris (igual a corona) */
.verified-btn {
    background: var(--glass-bg);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px 0 rgba(79,172,254,0.12), var(--shadow-glow);
    padding: 10px 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s cubic-bezier(.4,2,.6,1), box-shadow 0.2s;
    cursor: pointer;
    outline: none;
    position: relative;
}

/* Badge circular verde fluorescente dentro del contenedor gris */
.verified-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(55% 55% at 50% 50%, #34d399 0%, #10b981 60%, #059669 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 0 2px rgba(16,185,129,0.18), 0 10px 30px rgba(16,185,129,0.25), inset 0 0 18px rgba(16,185,129,0.45);
    position: relative;
    overflow: hidden;
}

.verified-badge::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(255,255,255,0.15), rgba(255,255,255,0) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 75%, rgba(255,255,255,0.15));
    filter: blur(6px);
    opacity: .6;
    animation: verifiedGlow 3s linear infinite;
    pointer-events: none;
}

.verified-badge::after {
    content: "";
    position: absolute;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.12), inset 0 6px 16px rgba(255,255,255,0.12);
    pointer-events: none;
}

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

.verified-icon {
    width: 20px;
    height: 20px;
    z-index: 1;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.7));
}

.verified-btn:hover, .verified-btn:focus {
    box-shadow: 0 6px 32px 0 rgba(79,172,254,0.2), 0 0 0 2px rgba(200,200,220,0.15), var(--shadow-glow);
    transform: translateY(-2px) scale(1.03);
}

.verified-btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(120,130,200,0.25), 0 18px 40px rgba(79,172,254,0.28), var(--shadow-glow);
}

.verified-btn:active {
    transform: translateY(0) scale(1.01);
}

/* Flotación similar a la corona para verificado */
.floating-verified {
    animation: verifiedFloat 2.4s ease-in-out infinite alternate;
}

@keyframes verifiedFloat {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-7px) scale(1.04); }
}

/* Profile Action Buttons */
.profile-action-btn {
    background: #4a90e2;
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 24px #4a90e233;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.15s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 200px;
    width: 100%;
    margin: 0;
}

.profile-action-btn:hover, .profile-action-btn:focus {
    background: #3578c7;
    transform: scale(1.045);
    box-shadow: 0 6px 32px #4a90e255;
}

.profile-action-btn#deleteAccountBtn {
    background: linear-gradient(90deg, #f5576c 60%, #ff884d 100%);
}

.profile-action-btn.logout-btn, .profile-action-btn#logoutBtn {
    background: linear-gradient(90deg, #ff4d4d 60%, #ee5a52 100%);
}

.profile-action-btn.logout-btn:hover, .profile-action-btn.logout-btn:focus, 
.profile-action-btn#logoutBtn:hover, .profile-action-btn#logoutBtn:focus {
    background: linear-gradient(90deg, #ee5a52 0%, #ff4d4d 100%);
}

.profile-action-btn#novedadesBtn {
    background: linear-gradient(90deg, #4ecdc4 60%, #44a08d 100%);
}

.profile-action-btn#novedadesBtn:hover, .profile-action-btn#novedadesBtn:focus {
    background: linear-gradient(90deg, #44a08d 0%, #4ecdc4 100%);
}

.profile-action-btn#googleLinkBtn {
    background: #fff;
    color: #23243a;
    font-weight: 700;
    border: 1.5px solid #e0e0e0;
}

.profile-action-btn#googleLinkBtn:hover, .profile-action-btn#googleLinkBtn:focus {
    background: #f5f5f5;
    color: #23243a;
}

.profile-action-btn#ruletaBtn {
    background: linear-gradient(90deg, #ffd700 60%, #ffed4e 100%);
    color: #23243a;
    font-weight: 700;
}

.profile-action-btn#ruletaBtn:hover, .profile-action-btn#ruletaBtn:focus {
    background: linear-gradient(90deg, #ffed4e 0%, #ffd700 100%);
    color: #23243a;
}

.profile-action-btn#deleteAccountBtn:hover, .profile-action-btn#deleteAccountBtn:focus {
    background: linear-gradient(90deg, #ff884d 0%, #f5576c 100%);
}

.delete-account-btn {
    display: block;
    margin: 32px auto 0 auto;
    padding: 16px 40px;
    background: linear-gradient(90deg, #f5576c 60%, #ff884d 100%);
    color: #fff;
    font-size: 1.18rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px #f5576c33;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.15s;
    outline: none;
}

.delete-account-btn:hover, .delete-account-btn:focus {
    background: linear-gradient(90deg, #ff884d 0%, #f5576c 100%);
    transform: scale(1.045);
    box-shadow: 0 6px 32px #f5576c55;
}

/* Efectos de fondo */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(103, 126, 234, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(245, 87, 108, 0.1), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: float-particles 20s linear infinite;
}

@keyframes float-particles {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-200px, -200px); }
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: sphere-float 8s ease-in-out infinite alternate;
}

.sphere-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-gradient);
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.sphere-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-gradient);
    top: 50%;
    right: -10%;
    animation-delay: 2s;
}

.sphere-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-gradient);
    bottom: 10%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes sphere-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.1); }
}

/* Gestión de pantallas */
.screen {
    display: none;
    min-height: 100vh;
    position: relative;
}

.screen.active {
    display: block;
    animation: fadeIn 0.6s ease-out;
}

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

/* Pantalla de Bienvenida */
.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

.logo-section {
    margin-bottom: 4rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
    animation: logo-pulse 2s ease-in-out infinite alternate;
}

.logo-inner {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.logo-inner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

@keyframes logo-pulse {
    0% { box-shadow: 0 0 20px rgba(103, 126, 234, 0.5); }
    100% { box-shadow: 0 0 40px rgba(103, 126, 234, 0.8); }
}

.app-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% { filter: drop-shadow(0 0 10px rgba(103, 126, 234, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(103, 126, 234, 0.8)); }
}

.app-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Showcase de características */
.features-showcase {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 300px;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.feature-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(100px) rotateY(45deg);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card.active {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
}

.feature-indicators {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--accent-gradient);
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

/* Botones */
.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(103, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Pantalla de Autenticación */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem; /* más espacio abajo para que el desplegable tenga lugar hacia abajo */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.back-btn {
    position: fixed; /* fuera del layout del contenedor */
    top: 1rem;
    left: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000; /* asegurar que se vea por encima de cualquier contenido */
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-tabs {
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.5rem;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.auth-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: slideUp 0.5s ease-out;
}

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

.auth-form h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Configuración de perfil */
.profile-setup {
    margin-bottom: 2rem;
}

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

.banner-upload, .avatar-upload {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.banner-upload {
    height: 120px;
}

.avatar-upload {
    height: 120px;
    border-radius: 50%;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-align: center;
}

.banner-upload:hover, .avatar-upload:hover {
    border-color: rgba(103, 126, 234, 0.5);
    background: rgba(103, 126, 234, 0.1);
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: none;
}

/* Contador de caracteres para textarea de biografía (registro) */
.char-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    pointer-events: none;
}

/* Estilo específico para selects: quitar apariencia nativa y agregar flecha personalizada */
.input-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
    cursor: pointer;
}

/* Fondo oscuro para las opciones del desplegable */
.input-group select option {
    background-color: #151522;
    color: #ffffff;
}

/* Reglas específicas para el select de país (por si algún navegador ignora la general) */
#registerCountry option {
    background-color: #151522;
    color: #ffffff;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: rgba(103, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(103, 126, 234, 0.2);
    transform: translateY(-2px);
}

/* Country picker button */
.country-picker {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 1rem 1.1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.country-picker:hover, .country-picker:focus {
    outline: none;
    border-color: rgba(103, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(103, 126, 234, 0.2);
    transform: translateY(-2px);
}
.country-picker-arrow {
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    opacity: 0.9;
}

/* Country modal overlay + card */
.country-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.country-modal-overlay.active {
    opacity: 1;
}
.country-modal {
    width: min(560px, 92vw);
    max-height: 80vh;
    background: rgba(20, 20, 30, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-glow);
    backdrop-filter: blur(18px);
    overflow: hidden;
    transform: translateY(24px) scale(0.98);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(.2,.7,.2,1), opacity 0.28s ease;
}
.country-modal-overlay.active .country-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.country-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
}
.country-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
}
.country-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.6rem;
    cursor: pointer;
}
.country-modal-body {
    padding: 14px 16px 4px;
}
.country-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: 54vh;
    overflow-y: auto;
    padding-right: 6px;
}
@media (min-width: 520px) {
    .country-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.country-item {
    padding: 12px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}
.country-item:hover, .country-item:focus {
    outline: none;
    background: rgba(103, 126, 234, 0.15);
    border-color: rgba(103, 126, 234, 0.45);
    transform: translateY(-2px);
}
.country-item.selected {
    background: rgba(103, 126, 234, 0.25);
    border-color: rgba(103, 126, 234, 0.65);
}
.country-modal-footer {
    padding: 12px 16px 16px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-muted);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.input-group input:focus + .input-line,
.input-group select:focus + .input-line,
.input-group textarea:focus + .input-line {
    width: 100%;
}

/* Badge de mensajes no leídos en matches */
.unread-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #e74c3c;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 7px 2px 7px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: 2px solid #fff;
    z-index: 2;
    line-height: 1.2;
    pointer-events: none;
}

.match-image {
    position: relative;
    overflow: visible;
}

/* Favoritos - Avatar y Banner */
.favorito-banner {
    width: 100%;
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: 16px 16px 0 0;
}

.favorito-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid #fff;
    margin: -32px auto 8px auto;
    box-shadow: 0 2px 8px #0002;
    position: relative;
    z-index: 2;
}

/* Aplicación Principal */
.app-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#screenTitle {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.diamonds-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.megaphone-btn {
    background: var(--glass-bg, rgba(255,255,255,0.10));
    border: 1.5px solid var(--border-color, #363652);
    color: #f39c12;
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: box-shadow 0.2s, background 0.2s, border 0.2s, transform 0.18s;
    cursor: pointer;
    box-shadow: 0 2px 8px 0 #f39c1233;
    margin-right: 2px;
}

.megaphone-btn svg {
    display: block;
    color: #f39c12;
    stroke: #f39c12;
    fill: none;
    width: 18px;
    height: 18px;
}

.megaphone-btn:hover {
    background: rgba(255,255,255,0.18);
    box-shadow: 0 4px 18px 0 #f39c1288;
    border-color: #f39c12;
    color: #fff;
}

/* Close chat button: same square glass style as other header button */
.close-chat-btn {
    background: var(--glass-bg, rgba(255,255,255,0.10));
    border: 1.5px solid var(--border-color, #363652);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 0; /* usaremos dimensiones fijas para igualar tamaño */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: box-shadow 0.2s, background 0.2s, border 0.2s;
    cursor: pointer;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.15);
    margin-left: 2px;
}
.close-chat-btn svg {
    display: block;
    color: currentColor;
    stroke: currentColor;
    fill: none;
    width: 18px;
    height: 18px;
}
.close-chat-btn:hover {
    background: rgba(255,255,255,0.18);
    box-shadow: 0 4px 18px 0 #f39c1288;
    border-color: #f39c12;
    color: #fff;
    transform: translateY(-2px);
}

.close-chat-btn:active {
    transform: translateY(0);
}

.watch-ad-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.watch-ad-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-color);
    box-shadow: none;
}

/* Estado deshabilitado: mostrar el botón en gris y sin efectos hover */
.watch-ad-btn[disabled] {
    background: #8a8a8a !important; /* gris neutro */
    color: #fff;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
    opacity: 1; /* mantener legible el texto */
    pointer-events: none; /* bloquear clics aunque haya handlers inline */
}

.watch-ad-btn[disabled]:hover {
    transform: none;
    box-shadow: none;
}

/* Estado usado (tono rosado oscuro), bloquea interacción como deshabilitado */
.watch-ad-btn.used {
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary);
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
    opacity: 1;
    pointer-events: none; /* prevenir que abra la modal */
}

.diamond-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    color: var(--diamond-color);
    font-weight: 600;
}

/* Navegación inferior */
.bottom-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item.active {
    color: var(--text-primary);
}

.nav-item.active .nav-icon {
    background: var(--primary-gradient);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: var(--shadow-glow);
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Área de contenido */
.content-area {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.content-area.active {
    display: block;
}

/* Pantalla Descubrir */
.discover-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
    /* Reservar espacio inferior para los botones fijos en móvil */
    padding-bottom: 6.5rem;
}

.cards-stack {
    position: relative;
    width: 320px;
    height: 500px;
    margin-bottom: 2rem;
    /* Permite scroll vertical del contenedor en móviles mientras el gesto horizontal se maneja en la card */
    touch-action: pan-y;
}

.discover-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    z-index: 1;
    user-select: none;
    -webkit-user-drag: none;
}

.discover-card:active {
    cursor: grabbing;
}

.discover-card.dragging {
    transition: none;
    z-index: 2;
}

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

.card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
}

.card-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.card-bio {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    font-size: 0.9rem;
}

/* Acciones de swipe */
.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.action-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    color: white;
}

.reject-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.like-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
}

.super-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.1);
}

/* ----- Responsivo: asegurar botones visibles en móvil ----- */
@media (max-width: 480px) {
    .discover-container {
        padding: 1rem;
        padding-bottom: calc( env(safe-area-inset-bottom, 0px) + 6rem );
        min-height: calc(100vh - 120px);
    }
    .cards-stack {
        width: 92vw;
        height: min(64vh, 420px);
        margin-bottom: 1rem; /* el espacio principal lo da padding-bottom del contenedor */
    }
    /* Fijar los botones al borde inferior para que siempre se vean */
    .swipe-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc( env(safe-area-inset-bottom, 0px) + 12px );
        margin: 0 auto;
        padding: 0 16px;
        justify-content: space-around;
        gap: 1rem;
        z-index: 1000;
        pointer-events: auto;
    }
    .action-btn, .favorite-btn {
        width: 56px;
        height: 56px;
    }
    .favorite-btn { margin: 0 8px; }
}

/* Pantalla Conocer */
.conocer-container {
    padding: 2rem;
}

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

.conocer-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.conocer-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: rgba(103, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(103, 126, 234, 0.2);
}

.reload-btn {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.reload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.4);
}

.active-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.active-profile-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.active-profile-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(103, 126, 234, 0.2);
}

.active-profile-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.profile-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(74, 222, 128, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-status.online {
    background: rgba(74, 222, 128, 0.9);
}

.profile-status.offline {
    background: rgba(255, 107, 107, 0.9);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.favorite-btn {
    background: linear-gradient(135deg, #ffd700, #ffe066);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.25);
    border: none;
    color: #b8860b;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.6rem;
    margin: 0 16px;
    position: static;
}

.favorite-btn:hover {
    background: linear-gradient(135deg, #ffe066, #ffd700);
    color: #fff;
    transform: translateY(-3px) scale(1.1);
}

.favorite-btn.favorited {
    background: #ffe066;
    color: #b8860b;
}

.active-profile-info {
    padding: 1.5rem;
}

.active-profile-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.active-profile-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.active-profile-bio {
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
}

.chat-profile-btn {
    flex: 1;
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.chat-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(103, 126, 234, 0.3);
}

.view-profile-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-profile-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Pantalla Favoritos */
.favoritos-container {
    padding: 2rem;
}

.favoritos-header {
    margin-bottom: 2rem;
}

.favoritos-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.favoritos-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.favoritos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.favorito-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.favorito-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
}

.favorito-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.favorito-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 215, 0, 0.9);
    color: #1a1a1a;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.remove-favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 107, 107, 0.9);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.remove-favorite-btn:hover {
    background: rgba(255, 107, 107, 1);
    transform: scale(1.1);
}

.favorito-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.favorito-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
}

.favorito-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
}

.favorito-actions {
    display: flex;
    gap: 0.75rem;
}

.chat-favorito-btn {
    flex: 1;
    background: var(--secondary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.chat-favorito-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.3);
}

/* Pantalla Matches */
.matches-container {
    padding: 2rem;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Matches search (rounded green style) */
#matchesContent .matches-search {
    position: relative;
    margin: 0 0 1rem 0;
}
#matchesContent .matches-search::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-size: 18px 18px;
    opacity: 0.9;
    /* Inline SVG magnifier with mint stroke */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a7f3d0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
}
#matchesContent .matches-search input {
    width: 100%;
    background: rgba(10, 30, 20, 0.75);
    border: 1px solid rgba(16, 185, 129, 0.35); /* emerald-500 */
    color: #eafff4;
    padding: 12px 44px 12px 44px; /* room for icon and clear */
    border-radius: 999px;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.12), 0 0 24px rgba(16, 185, 129, 0.08);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    caret-color: #34d399;
}
#matchesContent .matches-search input::placeholder {
    color: rgba(167, 243, 208, 0.9); /* mint */
}
#matchesContent .matches-search input:focus {
    border-color: rgba(16, 185, 129, 0.65);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25), 0 0 28px rgba(16, 185, 129, 0.18);
    background: rgba(12, 36, 24, 0.85);
}
#matchesContent .matches-search .icon-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #a7f3d0;
    font-size: 20px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
}
/* Hide clear button when input empty */
#matchesContent .matches-search input:placeholder-shown + .icon-btn { display: none; }

.match-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.match-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(103, 126, 234, 0.2);
}

.match-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.match-info {
    padding: 1rem;
}

.match-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.match-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Pantalla Chat */
.remove-match-btn {
    position: absolute;
    top: 0.9rem;
    right: 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 50;
    display: block !important;
    opacity: 1 !important;
}

.match-card .remove-match-btn {
    left: 1.2rem;
    right: auto;
    color: #e74c3c;
}

.match-card .remove-match-btn svg {
    color: #e74c3c;
    fill: #e74c3c;
}

.match-card .remove-match-btn:hover,
.match-card .remove-match-btn:focus {
    color: #c0392b;
}

.match-card .remove-match-btn:hover svg,
.match-card .remove-match-btn:focus svg {
    color: #c0392b;
    fill: #c0392b;
}

.remove-match-btn:hover {
    background: rgba(231, 76, 60, 0.08);
    box-shadow: 0 2px 8px #e74c3c33;
}

.match-card .remove-match-btn svg,
.match-card .remove-match-btn svg * {
    stroke: #e74c3c !important;
    color: #e74c3c !important;
    fill: none !important;
}

.match-card .remove-match-btn:hover svg,
.match-card .remove-match-btn:focus svg,
.match-card .remove-match-btn:hover svg *,
.match-card .remove-match-btn:focus svg * {
    stroke: #c0392b !important;
    color: #c0392b !important;
}

.match-card .remove-match-btn svg,
.match-card .remove-match-btn svg line,
.match-card .remove-match-btn svg path {
    stroke: #e74c3c !important;
    color: #e74c3c !important;
    fill: none !important;
}

.match-card .remove-match-btn:hover svg,
.match-card .remove-match-btn:focus svg,
.match-card .remove-match-btn:hover svg line,
.match-card .remove-match-btn:focus svg line,
.match-card .remove-match-btn:hover svg path,
.match-card .remove-match-btn:focus svg path {
    stroke: #c0392b !important;
    color: #c0392b !important;
}

/* Modal Quitar Match */
#removeMatchModal.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 20, 30, 0.88);
    z-index: 3000;
    transition: opacity 0.2s;
}

#removeMatchModal.hidden {
    display: none !important;
}

#removeMatchModal .modal-content {
    background: var(--glass-bg, #23243a);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(231, 76, 60, 0.15);
    padding: 2.5rem 2rem 2rem 2rem;
    max-width: 350px;
    width: 92vw;
    text-align: center;
}

#removeMatchModal h3 {
    color: #e74c3c;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

#removeMatchModal p {
    color: #fff;
    margin-bottom: 2rem;
    font-size: 1rem;
}

#removeMatchModal .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#removeMatchModal .btn-primary {
    background: linear-gradient(90deg, #e74c3c 0%, #fc6076 100%);
    color: #fff;
    border: none;
    font-weight: 700;
}

#removeMatchModal .btn-secondary {
    background: var(--glass-bg);
    color: #fff;
    border: 1px solid #e74c3c;
    font-weight: 700;
}

.reply-reference {
    background: rgba(0,0,0,0.10);
    border-left: 4px solid #667eea;
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    font-size: 0.93em;
    color: var(--text-secondary);
    max-width: 95%;
    white-space: pre-line;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(103,126,234,0.03);
}

.reply-sender {
    font-weight: 600;
    color: #667eea;
    margin-right: 4px;
}

.reply-text {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 80%;
    vertical-align: bottom;
}

.chat-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    height: calc(100vh - 200px);
}

.chat-list {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-list-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-list-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.conversations {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    background: transparent;
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #fff;
    background-image: none;
    box-shadow: 0 2px 10px 0 rgba(60,60,60,0.18), 0 0 0 2px #fff;
    border: 2.5px solid #fff;
    position: relative;
    z-index: 2;
    transition: box-shadow 0.2s, border 0.2s;
    overflow: hidden;
}

.conversation-avatar[style*="background-image"] {
    background-color: #fff;
    background-image: inherit !important;
}

.conversation-item:hover .conversation-avatar {
    box-shadow: 0 4px 16px 0 rgba(103,126,234,0.22), 0 0 0 2.5px #678eea;
    border: 2.5px solid #678eea;
}

.conversation-item.active {
    background: var(--glass-bg);
    box-shadow: 0 4px 24px 0 rgba(103,126,234,0.16);
    border: 1.5px solid var(--primary-gradient);
}

.conversation-item:hover {
    background: rgba(103,126,234,0.07);
    box-shadow: 0 2px 12px 0 rgba(103,126,234,0.10);
}

.conversation-info {
    flex: 1;
}

.conversation-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.conversation-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.conversation-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.conversation-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Ventana de chat */
.chat-window {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
}

.chat-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
}

.mobile-only {
    display: none;
}

.chat-partner-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.partner-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    background-size: cover;
    background-position: center;
}

.partner-details h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.partner-details span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.messages-container {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
}

.no-chat-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.no-chat-icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    position: relative;
    animation: messageSlide 0.3s ease-out;
}

.message.sent {
    align-self: flex-end;
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 6px;
}

.message.received {
    align-self: flex-start;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 6px;
}

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

.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
}

.diamond-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--diamond-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.message-input {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.message-input input {
    flex: 1;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 1rem;
}

.message-input input:focus {
    outline: none;
    border-color: rgba(103, 126, 234, 0.5);
}

.send-btn {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

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

/* Pantalla Perfil */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-view, .profile-edit {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
}

.profile-edit {
    display: none;
}


.profile-banner {
    height: 200px;
    background: var(--primary-gradient);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-profile-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.edit-profile-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.profile-info {
    padding: 2rem;
    position: relative;
}

.profile-avatar {
    position: absolute;
    top: -50px;
    left: 2rem;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: 4px solid var(--dark-bg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-placeholder {
    color: white;
}

.online-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #4ade80;
    border: 3px solid var(--dark-bg);
    border-radius: 50%;
}

.profile-details {
    margin-top: 60px;
}

.profile-details h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-details p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Edición de perfil */
.edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
}

.edit-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.cancel-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.edit-form {
    padding: 0 2rem 2rem;
}

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

.edit-banner-upload, .edit-avatar-upload {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
}

.edit-avatar-upload {
    border-radius: 50%;
}

.edit-banner-upload:hover, .edit-avatar-upload:hover {
    border-color: rgba(103, 126, 234, 0.5);
    background: rgba(103, 126, 234, 0.1);
}

/* Badge contador mensajes no leídos */
.unread-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 22px;
    height: 22px;
    background: #fc6076;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.98rem;
    font-weight: bold;
    z-index: 3;
    box-shadow: 0 2px 8px #fc607688;
    border: 2px solid #fff;
}

/* Modales */
.modal {
    z-index: 2147483647 !important;
}
#adModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
}
#adModal > div {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(20,24,38,0.92) !important;
    z-index: 2147483647 !important;
    overflow: visible !important;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 24, 38, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647 !important; /* máximo posible */
    pointer-events: auto !important;
    backdrop-filter: blur(6px);
    padding: 24px;
}

.cards-stack, .discover-container {
    overflow: visible !important;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background: linear-gradient(135deg, #23243a 60%, #2d314d 100%);
    border-radius: 22px;
    box-shadow: 0 8px 40px 0 #23243a88, 0 2px 16px #0002;
    padding: 2.2rem 2rem 1.5rem 2rem;
    color: #fff;
    min-width: 320px;
    max-width: 95vw;
    z-index: 99999 !important;
    pointer-events: auto !important;
    border: 2px solid #4ecdc4;
    position: relative;
    animation: modalCardPop 0.4s cubic-bezier(.36,1.64,.61,.99);
}

@keyframes modalCardPop {
    0% { transform: scale(0.85) translateY(40px); opacity: 0; }
    80% { transform: scale(1.05) translateY(-8px); opacity: 1; }
    100% { transform: scale(1) translateY(0); }
}

.modal-content h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    color: #f39c12;
    text-align: center;
}

.modal-content p {
    color: #d5d8e6;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-content textarea {
    font-size: 1.08rem;
    border: none;
    outline: none;
    background: #23243a;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px #0002;
    border: 1.5px solid #4ecdc4;
    margin-bottom: 1.1rem;
    transition: border-color 0.2s;
}

.modal-content textarea:focus {
    border-color: #f39c12;
}

.modal-actions {
    display: flex;
    gap: 1.1rem;
    justify-content: flex-end;
}

.btn-primary {
    background: linear-gradient(90deg, #f39c12 0%, #ff6a00 100%);
    color: #fff;
    border: none;
    font-size: 1.05rem;
    padding: 0.7rem 1.6rem;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px 0 #f39c1244;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #ff6a00 0%, #f39c12 100%);
    box-shadow: 0 4px 16px 0 #f39c1288;
}

.btn-secondary {
    background: linear-gradient(90deg, #23243a 0%, #44444d 100%);
    color: #fff;
    border: none;
    font-size: 1.05rem;
    padding: 0.7rem 1.6rem;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px 0 #0002;
    margin-bottom: 0;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    background: linear-gradient(90deg, #44444d 0%, #23243a 100%);
    box-shadow: 0 4px 16px 0 #0004;
}

/* Modal de Match */
.match-celebration {
    text-align: center;
}

.match-celebration h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: celebration-pulse 1s ease-in-out infinite alternate;
}

@keyframes celebration-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.match-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.match-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-gradient);
    background-size: cover;
    background-position: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.match-heart {
    font-size: 2rem;
    animation: heartBeat 1s ease-in-out infinite;
}

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

.match-celebration p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.match-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Modal de Anuncio */
.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.ad-video {
    background: var(--primary-gradient);
    height: 200px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.fake-ad {
    text-align: center;
    color: white;
}

.fake-ad h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ad-timer {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.ad-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--diamond-color);
}

/* Modal de Vista Previa del Perfil */
.profile-preview-modal-content {
    max-width: 500px;
    width: 90%;
    padding: 0;
}

.profile-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-preview-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-preview-content {
    padding: 0;
}

.preview-banner {
    width: 100%;
    height: 150px;
    background: var(--primary-gradient);
    background-size: cover;
    background-position: center;
    border-radius: 24px 24px 0 0;
}

.preview-info {
    padding: 2rem;
    position: relative;
}

.preview-avatar {
    position: absolute;
    top: -50px;
    left: 2rem;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: 4px solid var(--dark-bg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-details {
    margin-top: 60px;
    text-align: center;
}

.preview-details h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.preview-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.preview-details p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.report-user-section {
    padding: 0 2rem 2rem;
    text-align: center;
}

.report-user-btn {
    background: var(--secondary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.report-user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.3);
}

.report-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
}

.reply-block {
    display: block;
    margin-bottom: 2px;
}

.reply-username {
    color: #6c8cff;
    font-weight: bold;
}

.reply-colon {
    color: #6c8cff;
    font-weight: bold;
}

.reply-message {
    color: #bfc9d1;
    font-style: italic;
}

.toast-card {
    display: flex;
    align-items: center;
    background: var(--glass-bg, rgba(40,40,50,0.97));
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1.5px solid var(--primary-gradient, #667eea);
    padding: 12px 18px;
    min-width: 270px;
    max-width: 360px;
    gap: 14px;
    animation: fadeIn 0.5s, toastSlideIn 0.5s;
}

.toast-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover !important;
    background-position: center !important;
    flex-shrink: 0;
    border: 2px solid #fff3;
    box-shadow: 0 2px 8px 0 #0002;
    background-color: #23243a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.toast-avatar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: none;
}

.toast-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 600;
    color: #e5eaff;
    font-size: 1.06em;
    margin-bottom: 2px;
}

.toast-message-preview {
    color: #bfc9d1;
    font-size: 0.98em;
    font-style: italic;
    white-space: pre-line;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Animaciones adicionales */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Utilidades */
.hidden {
    display: none !important;
}

/* Toast de notificación de mensaje nuevo */
.toast-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #e5eaff;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    opacity: 0.7;
    transition: background 0.2s, opacity 0.2s;
}
.toast-close-btn:hover {
    background: #2a2f4a;
    opacity: 1;
}

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-message {
    min-width: 260px;
    max-width: 350px;
    background: var(--glass-bg, rgba(40,40,50,0.95));
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    display: flex;
    align-items: center;
    padding: 12px 18px;
    font-size: 1rem;
    animation: fadeIn 0.5s, toastSlideIn 0.5s;
    cursor: pointer;
    pointer-events: auto;
    border: 1px solid var(--primary-gradient, #667eea);
    transition: transform 0.3s cubic-bezier(.36,1.64,.61,.99), box-shadow 0.3s;
}

.toast-animate {
    animation: toastBounceIn 0.7s cubic-bezier(.36,1.64,.61,.99);
    box-shadow: 0 12px 40px 0 #6c8cff44, 0 1.5px 8px #0002;
}

.toast-hide {
    animation: fadeOut 0.7s forwards;
}

@keyframes toastBounceIn {
    0% { transform: scale(0.7) translateY(60px); opacity: 0; }
    60% { transform: scale(1.1) translateY(-10px); opacity: 1; }
    80% { transform: scale(0.98) translateY(2px); }
    100% { transform: scale(1) translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(40px) scale(0.9); }
}

.toast-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid #667eea;
    background: #222;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-sender {
    font-weight: bold;
    color: #6c8cff;
    font-size: 1.05em;
}

.toast-text {
    color: #e5eaff;
    font-size: 0.97em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6b5b95);
}

.match-card .remove-match-btn {
    left: 1.2rem;
    right: auto;
    color: #e74c3c !important;
}

.match-card .remove-match-btn:hover,
.match-card .remove-match-btn:focus {
    color: #c0392b !important;
}

.remove-match-img {
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
    user-select: none;
}

.remove-match-btn {
    background: none;
    border: none;
    padding: 0.2rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow:none;}