/* public/css/theme-dark-gold.css */
/* ============================================
   TEMA OSCURO CON DORADO - Estilo Con-Tor
   ============================================ */

/* Importar fuentes */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   VARIABLES GLOBALES
   ============================================ */
:root {
    /* Colores fondo */
    --bg-primary: #0F1113;
    --bg-secondary: #1a1d20;
    --bg-card: #1e2126;
    --bg-header: #0F1113;
    --bg-footer: #0a0c0e;
    
    /* Color dorado */
    --gold-primary: #FFD700;
    --gold-secondary: #DAA520;
    --gold-dark: #B8860B;
    --gold-light: #FFE066;
    --gold-glow: rgba(255,215,0,0.3);
    
    /* Texto */
    --text-primary: #E5E5E5;
    --text-secondary: #A0A0A0;
    --text-muted: #6c757d;
    
    /* Bordes */
    --border-color: #2a2d32;
    --border-gold: #FFD700;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-gold: 0 0 20px rgba(255,215,0,0.2);
    --shadow-gold-lg: 0 0 30px rgba(255,215,0,0.3);
    
    /* Gradientes */
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #DAA520 50%, #B8860B 100%);
    --gradient-gold-hover: linear-gradient(135deg, #FFE066 0%, #FFD700 50%, #DAA520 100%);
    --gradient-hero: radial-gradient(circle at 30% 50%, rgba(255,215,0,0.15) 0%, #0F1113 70%);
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-secondary);
}

/* Selección de texto */
::selection {
    background: var(--gold-primary);
    color: var(--bg-primary);
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
header {
    background-color: var(--bg-header);
    border-bottom: 2px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* Logo lado izquierdo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px var(--gold-primary); }
    50% { text-shadow: 0 0 20px var(--gold-primary), 0 0 30px var(--gold-primary); }
}

.logo-text {
    color: var(--gold-primary);
    font-weight: bold;
    font-size: 24px;
    letter-spacing: 1px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.imglogo {
    width: 50px;
    margin-right: 10px;
}

/* Contenedor izquierdo (logo + texto) */
.logo-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* NAV centrado */
nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Links normales */
nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 0;
}

/* Efecto underline dorado */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Hover efecto */
nav a:hover {
    color: var(--gold-primary);
}

/* Activo */
nav a.active {
    color: var(--gold-primary);
}

/* Botón login */
.btn-login-nav {
    border: 2px solid var(--gold-primary);
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-login-nav:hover {
    background: rgba(255,215,0,0.1);
    transform: translateY(-2px);
}

.btn-login-nav:hover::after {
    width: 0;
}

/* Botón registro */
.btn-register-nav {
    background: var(--gradient-gold);
    color: var(--bg-primary) !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-register-nav:hover {
    background: var(--gradient-gold-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-register-nav:hover::after {
    width: 0;
}

/* Botón cerrar sesión */
.btn-logout {
    background: transparent;
    border: 2px solid #dc3545;
    color: #dc3545 !important;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #dc3545;
    color: white !important;
    transform: translateY(-2px);
}

/* Botón administración */
.btn-admin-nav {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-admin-nav:hover {
    background: linear-gradient(135deg, #c82333, #a71d2a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    color: white !important;
}

/* ============================================
   MAIN - CORREGIDO PARA CENTRADO PERFECTO
   ============================================ */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   CONTENEDOR DE AUTENTICACIÓN - CENTRADO
   ============================================ */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
    margin: 0 auto;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   BOTONES GENERALES
   ============================================ */
.btn-primary {
    background: var(--gradient-gold);
    color: var(--bg-primary);
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-primary);
    border: 2px solid var(--gold-primary);
    padding: 10px 26px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--gold-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-warning {
    background: #f0ad4e;
    color: #1a1a1a;
    border: none;
}

.btn-warning:hover {
    background: #ec971f;
    transform: translateY(-2px);
}

.btn-danger {
    background: #d9534f;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c9302c;
    transform: translateY(-2px);
}

/* ============================================
   TARJETAS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-gold);
}

/* ============================================
   FORMULARIOS
   ============================================ */
input, select, textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-glow);
}

label {
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--gold-primary);
    padding: 2rem 2rem 1rem;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--gold-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
    color: #28a745;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
    color: #dc3545;
}

/* ============================================
   BADGES PARA TORNEOS
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 1rem;
}

.badge.abierto {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.badge.finalizado {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid #6c757d;
}

.badge.borrador {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.badge.cancelado {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.torneo-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    header {
        padding: 12px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 15px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    nav {
        gap: 10px;
    }
    
    nav a {
        font-size: 12px;
    }
    
    .btn-login-nav,
    .btn-register-nav,
    .btn-logout {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo-left {
        gap: 5px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    nav {
        gap: 8px;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .btn-primary {
        padding: 10px;
        font-size: 0.9rem;
    }
}
/* ============================================
   TOAST NOTIFICACIONES
   ============================================ */
.toast-notificacion {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border-left: 4px solid var(--gold-primary);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.toast-notificacion.show {
    transform: translateX(0);
}

.toast-notificacion.success {
    border-left-color: #28a745;
}

.toast-notificacion.warning {
    border-left-color: #ffc107;
}

.toast-notificacion.danger {
    border-left-color: #dc3545;
}

.toast-notificacion.info {
    border-left-color: #17a2b8;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: bold;
    color: var(--gold-primary);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
    transition: color 0.3s ease;
}

.toast-close:hover {
    color: var(--gold-primary);
}

@media (max-width: 768px) {
    .toast-notificacion {
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}