* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
}

/* ===== LOGIN ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: #1a1a2e;
}

.login-header p {
    color: #666;
    margin-top: 5px;
}

.login-help {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #999;
    background: #f5f7fa;
    padding: 8px;
    border-radius: 8px;
}

/* ===== ADMIN LAYOUT ===== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #1a1a2e;
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 20px;
}

.sidebar-header span {
    font-size: 12px;
    color: #8892b0;
    display: block;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #8892b0;
    text-decoration: none;
    transition: all 0.3s;
    gap: 12px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.top-bar h1 {
    font-size: 24px;
}

.btn-back {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* ===== STATS ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
}

.stat-info p {
    color: #666;
    font-size: 14px;
}

/* ===== ACTION GRID ===== */
.dashboard-actions {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.action-btn {
    padding: 15px;
    background: #f5f7fa;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* ===== FORMS ===== */
.form-section,
.upload-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.full-width {
    grid-column: 1 / -1;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #5a6fd6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-edit {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: #d97706;
}

/* ===== TABLES ===== */
.table-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.table-container h3 {
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f5f7fa;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
}

tbody tr:hover {
    background: #f8f9ff;
}

.actions {
    display: flex;
    gap: 8px;
}

/* ===== BADGES ===== */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-programado {
    background: #fbbf24;
    color: #78350f;
}

.badge-jugado {
    background: #34d399;
    color: #064e3b;
}

.badge-cancelado {
    background: #f87171;
    color: #7f1d1d;
}

.badge-activo {
    background: #34d399;
    color: #064e3b;
}

.badge-inactivo {
    background: #f87171;
    color: #7f1d1d;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ===== GALERÍA ===== */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.galeria-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: relative;
}

.galeria-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.galeria-info {
    padding: 15px;
}

.galeria-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.galeria-info p {
    color: #666;
    font-size: 14px;
}

.galeria-info small {
    color: #999;
    font-size: 12px;
}

.galeria-item .btn-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
}

.no-items {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 10px 0;
    }
    
    .sidebar-header h2,
    .sidebar-header span,
    .sidebar-nav a span {
        display: none;
    }
    
    .sidebar-nav a {
        justify-content: center;
        padding: 12px;
    }
    
    .sidebar-nav a i {
        margin: 0;
        font-size: 18px;
    }
    
    .main-content {
        margin-left: 60px;
        padding: 10px;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}


/* ===== EFECTOS Y ANIMACIONES ===== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Efecto de brillo para las imágenes */
.galeria-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,255,255,0.05) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.galeria-item:hover::before {
    animation: shimmer 1.5s ease;
}

/* Efecto de brillo en la imagen del lightbox */
#lightboxImage {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#lightboxImage:hover {
    transform: scale(1.02);
}

/* Sombra brillante para el modal */
.lightbox-modal.active {
    animation: fadeIn 0.4s ease;
}

/* Efecto de partículas en el fondo del lightbox */
.lightbox-modal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(102,126,234,0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Mejora del scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ===== RESPONSIVE EXTRA ===== */
@media (max-width: 768px) {
    .galeria-item .btn-delete {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 14px;
        opacity: 1;
        transform: scale(1);
    }
    
    .galeria-item .view-btn {
        bottom: 10px;
        right: 10px;
        padding: 8px 14px;
        font-size: 12px;
        opacity: 1;
    }
    
    .galeria-item .galeria-overlay {
        opacity: 1;
        background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.8));
    }
    
    .galeria-item .galeria-overlay h4 {
        transform: translateY(0);
        font-size: 16px;
    }
    
    .galeria-item .galeria-overlay p {
        transform: translateY(0);
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .galeria-item .btn-delete {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .galeria-item .view-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .galeria-item .galeria-overlay h4 {
        font-size: 14px;
    }
    
    .galeria-item .galeria-overlay p {
        font-size: 12px;
    }
}