/* ============================================
   ESTILO METIN2 WEB - Tema Morado
   ============================================ */

:root {
    --primary-emerald: #d2b8e8;
    --accent-emerald: #9b59b6;
    --dark-bg: #0d0a10;
    --dark-secondary: #1a131e;
    --dark-tertiary: #16111a;
    --text-main: #c8b8d8;
    --text-dim: #7a5a8a;
    --text-very-dim: #5a3d6a;
    --frame-green: #4f2a6b;
    --frame-green-light: #7a3d99;
    --frame-green-dark: #2a163a;
    --frame-green-deep: #150b1f;
    --danger: #c0392b;
    --success: #9b59b6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--dark-bg);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
}

/* ============ SCROLL PROGRESS ============ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-emerald) 0%, var(--primary-emerald) 50%, var(--accent-emerald) 100%);
    z-index: 1100;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

/* ============ FIREFLIES ============ */
.fireflies {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.firefly {
    position: absolute;
    width: 5px;
    height: 5px;
    background: radial-gradient(circle, rgba(155, 89, 182, 0.9) 0%, rgba(155, 89, 182, 0.4) 40%, transparent 70%);
    border-radius: 50%;
    animation: firefly-float 8s ease-in-out infinite, firefly-glow 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.8), 0 0 20px rgba(155, 89, 182, 0.5);
}

.firefly:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 7s; }
.firefly:nth-child(2) { left: 20%; top: 40%; animation-delay: 1s; animation-duration: 9s; }
.firefly:nth-child(3) { left: 30%; top: 15%; animation-delay: 2s; animation-duration: 6s; }
.firefly:nth-child(4) { left: 40%; top: 35%; animation-delay: 0.5s; animation-duration: 8s; }
.firefly:nth-child(5) { left: 50%; top: 25%; animation-delay: 1.5s; animation-duration: 7.5s; }
.firefly:nth-child(6) { left: 60%; top: 45%; animation-delay: 2.5s; animation-duration: 6.5s; }
.firefly:nth-child(7) { left: 70%; top: 20%; animation-delay: 0.8s; animation-duration: 8.5s; }
.firefly:nth-child(8) { left: 80%; top: 30%; animation-delay: 1.8s; animation-duration: 7.2s; }
.firefly:nth-child(9) { left: 85%; top: 50%; animation-delay: 3s; animation-duration: 9.5s; }
.firefly:nth-child(10) { left: 15%; top: 55%; animation-delay: 2.2s; animation-duration: 6.8s; }
.firefly:nth-child(11) { left: 45%; top: 10%; animation-delay: 0.3s; animation-duration: 7.8s; }
.firefly:nth-child(12) { left: 75%; top: 55%; animation-delay: 1.2s; animation-duration: 8.2s; }

@keyframes firefly-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(0.8); }
    50% { transform: translate(-15px, -50px) scale(1.1); }
    75% { transform: translate(25px, -20px) scale(0.9); }
}

@keyframes firefly-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ============ NAVBAR ============ */
#mainNav {
    background: rgba(13, 10, 16, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(155, 89, 182, 0.1);
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1050;
}

.nav-logo {
    height: 40px;
    filter: drop-shadow(0 2px 8px rgba(155, 89, 182, 0.3));
}

#mainNav .nav-link {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 1.2rem 1rem;
    transition: color 0.3s ease;
}

#mainNav .nav-link:hover {
    color: var(--accent-emerald);
}

.btn-login, .btn-register {
    border: 1px solid rgba(155, 89, 182, 0.3) !important;
    border-radius: 4px !important;
    margin: 0.5rem 0.25rem;
    padding: 0.5rem 1rem !important;
}

.btn-register {
    background: linear-gradient(135deg, var(--accent-emerald), #7d3c98) !important;
    color: #fff !important;
    border: none !important;
}

.btn-logout {
    color: var(--danger) !important;
    border: 1px solid rgba(192, 57, 43, 0.3) !important;
    border-radius: 4px !important;
    margin: 0.5rem 0.25rem;
    padding: 0.5rem 1rem !important;
}

.user-link {
    color: var(--accent-emerald) !important;
}

.navbar-toggler {
    border-color: rgba(155, 89, 182, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(200, 184, 216, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============ HERO SECTION ============ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    background: url('../img/bg.png') center/cover no-repeat;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at center, rgba(13, 10, 16, 0.3) 0%, rgba(13, 10, 16, 0.8) 70%),
        linear-gradient(180deg, transparent 0%, var(--dark-bg) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-logo {
    max-width: 320px;
    width: 100%;
    margin-bottom: 30px;
    filter: drop-shadow(0 15px 50px rgba(155, 89, 182, 0.35));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent-emerald);
    margin-bottom: 12px;
    font-weight: 600;
}

.hero-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 38px;
    color: var(--primary-emerald);
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 0 40px rgba(155, 89, 182, 0.4);
}

.hero-description {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 35px;
    opacity: 0.9;
}

/* Stats en Hero */
.hero-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.hero-stat {
    text-align: center;
    padding: 15px 25px;
    background: rgba(155, 89, 182, 0.05);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hero-stat:hover {
    border-color: var(--accent-emerald);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.1);
}

.hero-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    color: var(--accent-emerald);
    font-weight: 700;
    display: block;
}

.hero-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-top: 4px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 35px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-emerald) 0%, #7d3c98 100%);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 30px rgba(155, 89, 182, 0.25);
    text-decoration: none;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(155, 89, 182, 0.4);
    color: #fff;
}

.btn-outline-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 35px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--primary-emerald);
    background: transparent;
    border: 2px solid var(--accent-emerald);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
}

.btn-outline-gold:hover {
    background: rgba(155, 89, 182, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.2);
    color: var(--primary-emerald);
}

.btn-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 35px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4a1a6b 0%, #6b238c 50%, #4a1a6b 100%);
    border: 1px solid rgba(107, 35, 140, 0.4);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 6px 30px rgba(107, 35, 140, 0.3);
    text-decoration: none;
}

.btn-red:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(107, 35, 140, 0.5);
    color: #fff;
}

/* ============ SECTIONS ============ */
.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 30px;
    color: var(--primary-emerald);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.section-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
}

.ornament-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(155, 89, 182, 0.5), transparent);
}

.ornament-diamond {
    color: var(--accent-emerald);
    font-size: 12px;
    opacity: 0.7;
}

/* ============ CARDS ============ */
.game-card {
    background: linear-gradient(135deg, rgba(26, 19, 30, 0.9) 0%, rgba(22, 17, 26, 0.7) 100%);
    border: 1px solid rgba(155, 89, 182, 0.12);
    border-radius: 10px;
    padding: 30px;
    transition: all 0.4s ease;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(155, 89, 182, 0.35);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(155, 89, 182, 0.08);
}

.game-card-icon {
    font-size: 36px;
    color: var(--accent-emerald);
    margin-bottom: 15px;
}

.game-card-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--primary-emerald);
    margin-bottom: 10px;
    font-weight: 600;
}

.game-card-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.7;
    opacity: 0.8;
}

/* ============ MODAL ============ */
.modal-content {
    background: var(--dark-secondary) !important;
    border: 1px solid rgba(155, 89, 182, 0.2) !important;
    border-radius: 12px !important;
    color: var(--text-main);
}

.modal-header {
    border-bottom: 1px solid rgba(155, 89, 182, 0.1);
    padding: 20px 25px;
}

.modal-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-emerald);
    font-weight: 600;
}

.modal-body {
    padding: 25px;
}

.btn-close {
    filter: invert(0.7) sepia(1) hue-rotate(260deg);
}

.form-control {
    background: rgba(13, 10, 16, 0.8) !important;
    border: 1px solid rgba(155, 89, 182, 0.15) !important;
    color: var(--text-main) !important;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    background: rgba(13, 10, 16, 0.9) !important;
    border-color: var(--accent-emerald) !important;
    color: var(--text-main) !important;
    box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.1) !important;
}

.form-control::placeholder {
    color: var(--text-very-dim) !important;
}

.form-label {
    color: var(--text-main);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

/* ============ PANEL ============ */
.panel-section {
    padding-top: 100px;
    min-height: 100vh;
}

.panel-header {
    background: linear-gradient(135deg, rgba(26, 19, 30, 0.95), rgba(22, 17, 26, 0.8));
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.panel-username {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    color: var(--primary-emerald);
    font-weight: 700;
}

.panel-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.panel-info-item {
    background: rgba(13, 10, 16, 0.5);
    border: 1px solid var(--frame-green-deep);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.panel-info-value {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    color: var(--accent-emerald);
    font-weight: 700;
}

.panel-info-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ============ TABLA PERSONAJES ============ */
.characters-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.characters-table thead th {
    background: rgba(155, 89, 182, 0.06);
    color: var(--accent-emerald);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.15);
    font-weight: 600;
}

.characters-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.06);
    font-size: 13px;
    color: var(--text-main);
}

.characters-table tbody tr:hover {
    background: rgba(155, 89, 182, 0.04);
}

/* ============ RANKING ============ */
.ranking-section {
    padding-top: 100px;
    min-height: 100vh;
}

.ranking-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.ranking-tab {
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-dim);
    background: rgba(26, 19, 30, 0.6);
    border: 1px solid rgba(155, 89, 182, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.ranking-tab:hover,
.ranking-tab.active {
    color: var(--accent-emerald);
    border-color: var(--accent-emerald);
    background: rgba(155, 89, 182, 0.08);
}

.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(135deg, rgba(26, 19, 30, 0.9), rgba(22, 17, 26, 0.7));
    border: 1px solid rgba(155, 89, 182, 0.12);
    border-radius: 10px;
    overflow: hidden;
}

.ranking-table thead th {
    background: rgba(155, 89, 182, 0.06);
    color: var(--accent-emerald);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 16px;
    font-weight: 600;
    border-bottom: 1px solid rgba(155, 89, 182, 0.15);
}

.ranking-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.06);
    font-size: 13px;
    color: var(--text-main);
}

.ranking-table tbody tr:hover {
    background: rgba(155, 89, 182, 0.04);
}

.rank-pos {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--accent-emerald);
}

.rank-gold { color: #9b59b6; }
.rank-silver { color: #bf8fd9; }
.rank-bronze { color: #9a5ab0; }

/* ============ FOOTER ============ */
.site-footer {
    background: var(--dark-secondary);
    border-top: 1px solid rgba(155, 89, 182, 0.1);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-emerald);
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-text {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-emerald);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    background: rgba(155, 89, 182, 0.08);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(155, 89, 182, 0.08);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-very-dim);
}

/* ============ ALERTS ============ */
.alert-success {
    background: rgba(155, 89, 182, 0.1);
    border: 1px solid rgba(155, 89, 182, 0.3);
    color: #bb8fd9;
}

.alert-danger {
    background: rgba(192, 57, 43, 0.1);
    border: 1px solid rgba(192, 57, 43, 0.3);
    color: #e88a82;
}

/* ============ ADMIN ============ */
.admin-section {
    padding-top: 100px;
    min-height: 100vh;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(135deg, rgba(26, 19, 30, 0.9), rgba(22, 17, 26, 0.7));
    border: 1px solid rgba(155, 89, 182, 0.12);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table thead th {
    background: rgba(155, 89, 182, 0.06);
    color: var(--accent-emerald);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 14px;
    font-weight: 600;
    border-bottom: 1px solid rgba(155, 89, 182, 0.15);
}

.admin-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.06);
    font-size: 12px;
    color: var(--text-main);
}

.admin-table tbody tr:hover {
    background: rgba(155, 89, 182, 0.04);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.badge-ok {
    background: rgba(155, 89, 182, 0.15);
    color: #bb8fd9;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-block {
    background: rgba(192, 57, 43, 0.15);
    color: #e88a82;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============ CHANGE PASSWORD ============ */
.change-pass-card {
    background: linear-gradient(135deg, rgba(26, 19, 30, 0.9), rgba(22, 17, 26, 0.7));
    border: 1px solid rgba(155, 89, 182, 0.12);
    border-radius: 10px;
    padding: 30px;
    margin-top: 30px;
}

.change-pass-card h4 {
    font-family: 'Cinzel', serif;
    color: var(--primary-emerald);
    font-size: 18px;
    margin-bottom: 20px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 26px;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .hero-stat {
        padding: 12px 18px;
    }
    
    .panel-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .ranking-tabs {
        gap: 4px;
    }
    
    .ranking-tab {
        padding: 8px 14px;
        font-size: 11px;
    }
}


/* ============ REGISTRO MODAL PREMIUM ============ */
.modal-content.register-modal,
#registerModal .modal-content.register-modal {
    background: linear-gradient(160deg, rgba(26, 19, 30, 0.97) 0%, rgba(13, 10, 16, 0.98) 100%) !important;
    border: 1px solid rgba(155, 89, 182, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
    padding: 0 !important;
    overflow: hidden;
}

#registerModal .register-close {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 10;
    filter: invert(0.7) sepia(1) hue-rotate(260deg);
}

#registerModal .register-card {
    padding: 40px 35px;
    position: relative;
}

#registerModal .register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
}

.register-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.register-kanji {
    font-size: 36px;
    line-height: 1;
    color: var(--accent-emerald);
    text-shadow: 0 0 15px rgba(155, 89, 182, 0.4);
}

.register-title {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    color: var(--primary-emerald);
    font-weight: 700;
    letter-spacing: 3px;
    margin: 0;
}

/* Campos del registro */
.register-field {
    margin-bottom: 16px;
}

.register-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(13, 10, 16, 0.6);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: 8px;
    padding: 0 16px;
    transition: all 0.3s ease;
}

.register-input-wrapper:focus-within {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.08), 0 4px 15px rgba(155, 89, 182, 0.1);
}

.register-icon {
    font-size: 16px;
    color: var(--text-dim);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

input.register-input,
input.register-input:focus,
input.register-input:active {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--text-main) !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    padding: 16px 12px;
    box-shadow: none !important;
    width: 100%;
    height: auto;
    -webkit-appearance: none;
    appearance: none;
}

input.register-input::placeholder {
    color: var(--text-dim);
    font-size: 13px;
    opacity: 1;
}

.register-toggle-pass {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.3s ease;
    line-height: 1;
}

.register-toggle-pass:hover {
    color: var(--accent-emerald);
}

/* Términos */
.register-terms {
    margin: 20px 0;
}

.register-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1.5;
}

.register-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-emerald);
    flex-shrink: 0;
    cursor: pointer;
}

.terms-link {
    color: var(--accent-emerald);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.terms-link:hover {
    opacity: 0.8;
    color: var(--accent-emerald);
}

/* Botón de registro */
button.register-btn,
button.register-btn:focus,
button.register-btn:active {
    width: 100%;
    padding: 16px 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4a1a6b 0%, var(--accent-emerald) 50%, #4a1a6b 100%);
    background-size: 200% 100%;
    border: 1px solid rgba(155, 89, 182, 0.4);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(155, 89, 182, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    animation: btn-shimmer 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button.register-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 40px rgba(155, 89, 182, 0.4), 0 0 20px rgba(155, 89, 182, 0.15);
    border-color: rgba(155, 89, 182, 0.6);
    color: #fff;
}

button.register-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* reCAPTCHA dentro del registro */
#registerModal .g-recaptcha {
    margin: 5px 0;
}

@keyframes btn-shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* ============ FIX INPUTS - MÁXIMA ESPECIFICIDAD ============ */
.modal .register-input-wrapper {
    background: rgba(13, 10, 16, 0.8) !important;
    border: 1px solid rgba(155, 89, 182, 0.2) !important;
    border-radius: 8px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
}
.modal .register-input-wrapper:focus-within {
    border-color: #9b59b6 !important;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1) !important;
}
.modal input.register-input,
.modal input.register-input:focus,
.modal input.register-input:active,
.modal input.register-input:hover {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #c8b8d8 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    padding: 16px 12px !important;
    height: auto !important;
    width: 100% !important;
    flex: 1 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.modal input.register-input::placeholder {
    color: #7a5a8a !important;
    opacity: 1 !important;
}
.modal input.register-input:-webkit-autofill,
.modal input.register-input:-webkit-autofill:hover,
.modal input.register-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #c8b8d8 !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(13, 10, 16, 0.9) inset !important;
    box-shadow: 0 0 0px 1000px rgba(13, 10, 16, 0.9) inset !important;
}
.modal .register-toggle-pass {
    background: none !important;
    border: none !important;
    color: #7a5a8a !important;
    cursor: pointer !important;
    padding: 5px !important;
    font-size: 16px !important;
}
.modal .register-toggle-pass:hover {
    color: #9b59b6 !important;
}
.modal button.register-btn,
.modal button.register-btn:focus {
    width: 100% !important;
    padding: 16px 30px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #4a1a6b 0%, #9b59b6 50%, #4a1a6b 100%) !important;
    background-size: 200% 100% !important;
    border: 1px solid rgba(155, 89, 182, 0.4) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 6px 30px rgba(155, 89, 182, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    animation: btn-shimmer 3s ease-in-out infinite !important;
}
.modal button.register-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 10px 40px rgba(155, 89, 182, 0.4) !important;
}

/* Login modal - mismo estilo */
#loginModal .modal-content.register-modal,
#registerModal .modal-content.register-modal {
    background: linear-gradient(160deg, rgba(26, 19, 30, 0.97) 0%, rgba(13, 10, 16, 0.98) 100%) !important;
    border: 1px solid rgba(155, 89, 182, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* ============ REGISTRO STANDALONE (fuera de modal) ============ */
.panel-section .register-card {
    background: linear-gradient(160deg, rgba(26, 19, 30, 0.97) 0%, rgba(13, 10, 16, 0.98) 100%);
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 16px;
    padding: 40px 35px;
    position: relative;
    overflow: hidden;
}
.panel-section .register-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
}
.panel-section .register-input-wrapper {
    background: rgba(13, 10, 16, 0.8) !important;
    border: 1px solid rgba(155, 89, 182, 0.2) !important;
    border-radius: 8px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
}
.panel-section input.register-input,
.panel-section input.register-input:focus {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #c8b8d8 !important;
    font-size: 14px !important;
    padding: 16px 12px !important;
    flex: 1 !important;
    height: auto !important;
}
.panel-section input.register-input::placeholder {
    color: #7a5a8a !important;
}
.panel-section button.register-btn {
    width: 100% !important;
    padding: 16px 30px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #4a1a6b 0%, #9b59b6 50%, #4a1a6b 100%) !important;
    background-size: 200% 100% !important;
    border: 1px solid rgba(155, 89, 182, 0.4) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    animation: btn-shimmer 3s ease-in-out infinite !important;
}
.panel-section .register-toggle-pass {
    background: none !important;
    border: none !important;
    color: #7a5a8a !important;
    cursor: pointer !important;
}

/* ============ GALERÍA ============ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(155, 89, 182, 0.12);
    background: linear-gradient(135deg, rgba(26, 19, 30, 0.9), rgba(22, 17, 26, 0.7));
    cursor: pointer;
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: rgba(155, 89, 182, 0.35);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(155, 89, 182, 0.08);
}

.gallery-thumb {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-thumb img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 10, 16, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 32px;
    color: var(--accent-emerald);
    text-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
}

.gallery-caption {
    padding: 15px 18px;
}

.gallery-caption h4 {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--primary-emerald);
    margin: 0 0 4px;
    font-weight: 600;
}

.gallery-caption p {
    font-size: 12px;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.5;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: var(--text-main);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent-emerald);
}

.lightbox img {
    max-width: 90%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.2);
}

.lightbox-title {
    margin-top: 15px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    color: var(--primary-emerald);
    text-align: center;
}

/* ============ ADMIN GALERÍA ============ */
.gallery-admin-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-admin-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(13, 10, 16, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.08);
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.gallery-admin-item:hover {
    border-color: rgba(155, 89, 182, 0.2);
}

.gallery-admin-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(155, 89, 182, 0.1);
}

.gallery-admin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-admin-info {
    flex: 1;
    min-width: 0;
}

.gallery-admin-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .gallery-thumb {
        height: 150px;
    }
    
    .gallery-admin-item {
        flex-wrap: wrap;
    }
}

/* ============ MODAL DESCARGAS ============ */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(13, 10, 16, 0.6);
    border: 1px solid rgba(155, 89, 182, 0.12);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-item:hover {
    border-color: var(--accent-emerald);
    background: rgba(155, 89, 182, 0.06);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(155, 89, 182, 0.1);
}

.download-item-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(155, 89, 182, 0.1);
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.download-item-icon i {
    font-size: 20px;
    color: var(--accent-emerald);
}

.download-item-info {
    flex: 1;
    min-width: 0;
}

.download-item-title {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-emerald);
    margin-bottom: 2px;
}

.download-item-meta {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-item-arrow {
    flex-shrink: 0;
    color: var(--text-dim);
    font-size: 14px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.download-item:hover .download-item-arrow {
    color: var(--accent-emerald);
    transform: translate(3px, -3px);
}

/* ============ DISCORD NAV BUTTON ============ */
.nav-discord {
    color: #7289da !important;
    transition: all 0.3s ease !important;
}
.nav-discord:hover {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(114, 137, 218, 0.6);
}
.nav-discord i {
    font-size: 15px;
    margin-right: 2px;
}

/* ============ RANKING MINI (INDEX) ============ */
.ranking-table-mini {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}

.ranking-table-mini thead th {
    background: rgba(155, 89, 182, 0.05);
    color: var(--accent-emerald);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.12);
    font-weight: 600;
}

.ranking-table-mini tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.05);
    font-size: 13px;
    color: var(--text-main);
}

.ranking-table-mini tbody tr:hover {
    background: rgba(155, 89, 182, 0.04);
}

.rank-name {
    color: var(--primary-emerald) !important;
    font-weight: 600;
}

.rank-exp {
    color: var(--text-dim);
    font-size: 12px;
}

.rank-time {
    color: var(--text-dim);
    font-size: 12px;
    font-style: italic;
}

/* ============ EMPIRE / REINO ============ */
.empire-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.empire-flag {
    font-size: 12px;
    line-height: 1;
}

/* ============ FORGOT PASSWORD ============ */
.forgot-link {
    color: var(--text-dim);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s ease;
}
.forgot-link:hover {
    color: var(--accent-emerald);
}
.forgot-step {
    transition: opacity 0.3s ease;
}

/* ============ PÁGINAS USER (standalone, fuera de modal) ============ */
.panel-section .register-card .register-input-wrapper {
    background: rgba(13, 10, 16, 0.8) !important;
    border: 1px solid rgba(155, 89, 182, 0.2) !important;
    border-radius: 8px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
}
.panel-section .register-card .register-input-wrapper:focus-within {
    border-color: #9b59b6 !important;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1) !important;
}
.panel-section .register-card input.register-input,
.panel-section .register-card input.register-input:focus,
.panel-section .register-card input.register-input:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #c8b8d8 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    padding: 16px 12px !important;
    height: auto !important;
    width: 100% !important;
    flex: 1 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.panel-section .register-card input.register-input::placeholder {
    color: #7a5a8a !important;
    opacity: 1 !important;
}
.panel-section .register-card input.register-input:-webkit-autofill,
.panel-section .register-card input.register-input:-webkit-autofill:hover,
.panel-section .register-card input.register-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #c8b8d8 !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(13, 10, 16, 0.9) inset !important;
}
.panel-section .register-card .register-toggle-pass {
    background: none !important;
    border: none !important;
    color: #7a5a8a !important;
    cursor: pointer !important;
    padding: 5px !important;
    font-size: 16px !important;
}
.panel-section .register-card .register-toggle-pass:hover {
    color: #9b59b6 !important;
}
.panel-section .register-card button.register-btn,
.panel-section .register-card button.register-btn:focus {
    width: 100% !important;
    padding: 16px 30px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #4a1a6b 0%, #9b59b6 50%, #4a1a6b 100%) !important;
    background-size: 200% 100% !important;
    border: 1px solid rgba(155, 89, 182, 0.4) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 6px 30px rgba(155, 89, 182, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    animation: btn-shimmer 3s ease-in-out infinite !important;
    transition: all 0.4s ease !important;
}
.panel-section .register-card button.register-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 10px 40px rgba(155, 89, 182, 0.4) !important;
    color: #fff !important;
}
