/**
 * MASSOLAGROUP GAMES - STYLE.CSS
 * Paleta: Navy #004e92 + Cielo #00a8e8 + Fondo #f7f9fb
 * Sin degradados - Colores planos y limpios
 */

/* ============================================
   VARIABLES GLOBALES
   ============================================ */
:root {
    /* Colores Principales */
    --color-primary: #004e92;        /* Azul Navy (Botones, Títulos) */
    --color-secondary: #00a8e8;      /* Azul Cielo (Acentos, Links) */
    --color-background: #f7f9fb;     /* Fondo Claro */
    --color-white: #ffffff;
    --color-text: #333333;
    --color-light-text: #666666;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 78, 146, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 78, 146, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 78, 146, 0.16);
    --shadow-xl: 0 12px 24px rgba(0, 78, 146, 0.2);
    
    /* Fuentes */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Bordes */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* ============================================
   BURBUJAS FLOTANTES DE FONDO
   ============================================ */
.bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 168, 232, 0.06);
    border: 2px solid rgba(0, 168, 232, 0.1);
    animation: float 20s ease-in-out infinite;
}

.bubble-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.bubble-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 10%;
    animation-delay: 7s;
}

.bubble-3 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    left: 20%;
    animation-delay: 14s;
}

.bubble-4 {
    width: 100px;
    height: 100px;
    top: 70%;
    right: 25%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-40px) translateX(-10px);
    }
    75% {
        transform: translateY(-20px) translateX(10px);
    }
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-align: center;
}

/* Botón Primario */
.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #003d73;
    border-color: #003d73;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Botón Secundario */
.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: #0090c9;
    border-color: #0090c9;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Botón Outline */
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Botón Success */
.btn-success {
    background: var(--color-success);
    color: var(--color-white);
    border-color: var(--color-success);
}

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

/* Botón Danger */
.btn-danger {
    background: var(--color-danger);
    color: var(--color-white);
    border-color: var(--color-danger);
}

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

/* Botón Disabled */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tamaños de Botones */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 78, 146, 0.1);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    border-bottom: 2px solid var(--color-background);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.card-body {
    color: var(--color-text);
}

.card-footer {
    border-top: 2px solid var(--color-background);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.badge-secondary {
    background: var(--color-secondary);
    color: var(--color-white);
}

.badge-success {
    background: var(--color-success);
    color: var(--color-white);
}

.badge-warning {
    background: var(--color-warning);
    color: var(--color-white);
}

.badge-danger {
    background: var(--color-danger);
    color: var(--color-white);
}

.badge-light {
    background: var(--color-background);
    color: var(--color-text);
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    border-color: var(--color-success);
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border-color: var(--color-warning);
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border-color: var(--color-danger);
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--color-info);
    color: #1e40af;
}

/* ============================================
   INPUTS & FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-stack);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
}

.form-control::placeholder {
    color: var(--color-light-text);
}

/* ============================================
   TABLES
   ============================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table thead {
    background: var(--color-primary);
    color: var(--color-white);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-background);
}

.table tbody tr:hover {
    background: rgba(0, 168, 232, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   MODALES
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--color-background);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--color-background);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress {
    width: 100%;
    height: 0.75rem;
    background: var(--color-background);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-secondary);
    transition: width var(--transition-base);
}

.progress-bar-primary {
    background: var(--color-primary);
}

.progress-bar-success {
    background: var(--color-success);
}

/* ============================================
   TOOLTIPS
   ============================================ */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ============================================
   SPINNER / LOADING
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-background);
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   UTILIDADES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-muted { color: var(--color-light-text); }

.bg-white { background: var(--color-white); }
.bg-light { background: var(--color-background); }
.bg-primary { background: var(--color-primary); color: var(--color-white); }
.bg-secondary { background: var(--color-secondary); color: var(--color-white); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ============================================
   RESPONSIVIDAD
   ============================================ */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .bubble-1,
    .bubble-2,
    .bubble-3,
    .bubble-4 {
        display: none; /* Ocultar burbujas en móviles */
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        max-width: 100%;
    }
    
    .modal {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}
