/* ============================================
   NFS - NATIONAL FORMULA SERIES
   BASE STYLES - Común para todas las páginas
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --color-bg: #050508;
    --color-primary: #00d4ff;
    --color-secondary: #ff2d55;
    --color-accent: #7b2cbf;
    --color-gold: #ffd700;
    --color-text: #ffffff;
    --color-text-muted: #8b8b9e;
    --color-surface: rgba(255, 255, 255, 0.03);
    --color-surface-hover: rgba(255, 255, 255, 0.08);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-success: #00ff88;
    --color-warning: #ffaa00;
    --color-error: #ff4444;
    
    /* Fonts */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Exo 2', sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
}

html {
    background: var(--color-bg);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   ANIMATED BACKGROUNDS
   ============================================ */

.bg-racing-lines {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-racing-lines::before,
.bg-racing-lines::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-primary) 20%, 
        transparent 40%,
        transparent 60%,
        var(--color-secondary) 80%,
        transparent 100%
    );
    opacity: 0.15;
    animation: racingLine 8s linear infinite;
}

.bg-racing-lines::before {
    top: 30%;
    left: -100%;
    transform: rotate(-3deg);
}

.bg-racing-lines::after {
    bottom: 40%;
    left: -100%;
    transform: rotate(2deg);
    animation-delay: 4s;
    animation-duration: 10s;
}

@keyframes racingLine {
    0% { transform: translateX(0) rotate(-3deg); }
    100% { transform: translateX(50%) rotate(-3deg); }
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: 
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 70%, rgba(255, 45, 85, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 50% 90%, rgba(123, 44, 191, 0.06) 0%, transparent 50%);
}

/* ============================================
   CONTAINER
   ============================================ */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-md);
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
    padding: 0 var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 100px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--color-text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

.logo img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.logo span {
    color: var(--color-primary);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav-desktop {
    display: none;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

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

.cta-desktop {
    display: none;
    align-items: center;
    gap: var(--space-sm);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, var(--color-secondary), #cc0033);
    color: var(--color-text);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 45, 85, 0.4);
}

.btn-primary.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.85rem;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-secondary.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.85rem;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 68, 68, 0.1);
    color: var(--color-error);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 68, 68, 0.3);
    cursor: pointer;
}

.btn-logout:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: var(--color-error);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 68, 68, 0.3);
}

.btn-logout svg {
    width: 16px;
    height: 16px;
}

.btn-disconnect {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 170, 0, 0.1);
    color: var(--color-warning);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 170, 0, 0.3);
    cursor: pointer;
}

.btn-disconnect:hover {
    background: rgba(255, 170, 0, 0.2);
    border-color: var(--color-warning);
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(5, 5, 8, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--color-border);
    flex-direction: column;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

.mobile-menu-header img {
    width: 2rem;
    height: 2rem;
}

.mobile-menu-header span {
    color: var(--color-primary);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    flex: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--color-surface);
    color: var(--color-primary);
}

.mobile-cta {
    margin-top: auto;
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.mobile-cta .btn-primary,
.mobile-cta .btn-secondary {
    width: 100%;
    justify-content: center;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--color-border);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

.footer-logo img {
    width: 2rem;
    height: 2rem;
}

.footer-logo span {
    color: var(--color-primary);
}

.footer-tagline {
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.footer-description {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-links h4,
.footer-social h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.footer-links nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-bg);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* ============================================
   NOTIFICATION SYSTEM
   ============================================ */

.notification {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 400;
    min-width: 300px;
    max-width: 400px;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideInNotification 0.3s ease;
}

@keyframes slideInNotification {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid var(--color-success);
}

.notification.error {
    border-left: 4px solid var(--color-error);
}

.notification.info {
    border-left: 4px solid var(--color-primary);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: bold;
}

.notification.success .notification-icon {
    background: rgba(0, 255, 136, 0.2);
    color: var(--color-success);
}

.notification.success .notification-icon::before {
    content: "✓";
}

.notification.error .notification-icon {
    background: rgba(255, 68, 68, 0.2);
    color: var(--color-error);
}

.notification.error .notification-icon::before {
    content: "✕";
}

.notification.info .notification-icon {
    background: rgba(0, 212, 255, 0.2);
    color: var(--color-primary);
}

.notification.info .notification-icon::before {
    content: "i";
}

.notification-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--color-text);
}

.notification-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: var(--color-text);
}

/* ============================================
   FORM ELEMENTS (Base)
   ============================================ */

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group label svg {
    color: var(--color-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
    color: #ffffff;
}

.form-group input:not(:placeholder-shown),
.form-group select:not([value=""]),
.form-group textarea:not(:placeholder-shown) {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
}

.form-group input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* ============================================
   LOADING STATES
   ============================================ */

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-text {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ============================================
   MODAL BASE
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: var(--space-md);
}

.modal-content {
    background: rgba(10, 10, 15, 0.98);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

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

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: none;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 68, 68, 0.2);
    color: var(--color-error);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.modal-footer {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

/* ============================================
   CARDS BASE
   ============================================ */

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: var(--space-xl);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    color: var(--color-primary);
}

.card-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.section-title span {
    display: block;
    color: var(--color-text-muted);
}

.section-title .highlight {
    color: var(--color-text);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   PAGE HEADER (Para páginas secundarias)
   ============================================ */

.page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding-top: var(--space-xl);
}

.page-badge {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 45, 85, 0.1);
    border: 1px solid var(--color-secondary);
    border-radius: 100px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-secondary);
    margin-bottom: var(--space-lg);
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   STATUS INDICATORS
   ============================================ */

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.pending {
    background: var(--color-warning);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.active,
.status-dot.verified {
    background: var(--color-success);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.status-dot.error {
    background: var(--color-error);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

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

/* ============================================
   SECTION CTA (Call to Action)
   ============================================ */
.section-cta {
    display: flex;
    justify-content: center;
    margin-top: var(--space-2xl);
}

.section-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .cta-desktop {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .footer-content {
        text-align: center;
    }
    
    .footer-brand {
        max-width: none;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-links nav {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .notification {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button,
    .modal-actions a {
        width: 100%;
    }
}

