:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --card-bg: #111111;
    --cyan: #00E5FF;
    --text-main: #F5F5F5;
    --text-muted: #888888;
    --danger: #ff4757;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-darker); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.text-cyan { color: var(--cyan); }
.w-100 { width: 100%; }
.mt-3 { margin-top: 15px; }
.mb-3 { margin-bottom: 15px; }

/* Navegación Alumno */
.portal-header { background: var(--bg-dark); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #222; position: sticky; top: 0; z-index: 100; }
.portal-logo { height: 30px; }
.btn-logout { font-size: 0.8rem; color: var(--text-muted); border: 1px solid #333; padding: 5px 10px; border-radius: 5px; }
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }
.back-btn { font-size: 1.5rem; color: var(--text-main); padding-right: 15px; }

/* Contenedores */
.container { padding: 20px; max-width: 800px; margin: 0 auto; }
.welcome-section { display: flex; align-items: center; gap: 15px; margin-bottom: 30px; background: var(--bg-dark); padding: 20px; border-radius: 12px; border: 1px solid #222;}
.avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cyan); background: #222; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; color: var(--cyan); }

/* Módulos (Botones grandes) */
.module-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.module-card { background: var(--card-bg); border: 1px solid #222; padding: 20px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; transition: 0.2s; cursor: pointer; }
.module-card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.module-icon { font-size: 2rem; margin-right: 15px; }
.module-info h3 { font-size: 1.1rem; margin-bottom: 5px; }
.module-info p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.3; }

/* Rutina View */
.gral-params { background: #1a1a1a; padding: 15px; border-radius: 8px; border-left: 3px solid var(--cyan); margin-bottom: 25px; font-size: 0.85rem; }
.day-block { margin-bottom: 25px; }
.day-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; color: var(--cyan); border-bottom: 1px solid #222; padding-bottom: 5px; }
.ejercicio-card { background: #111; border: 1px solid #222; border-radius: 8px; padding: 15px; margin-bottom: 10px; display: flex; gap: 15px; }
.ej-img { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; background: #222; flex-shrink: 0; }
.ej-info { flex: 1; }
.ej-info h4 { font-size: 1rem; margin-bottom: 5px; }
.ej-meta { display: flex; gap: 10px; font-size: 0.8rem; color: var(--cyan); font-weight: 600; margin-bottom: 5px; }
.ej-obs { font-size: 0.8rem; color: var(--text-muted); background: #1a1a1a; padding: 8px; border-radius: 4px; margin-top: 5px; }
.btn-pdf { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--cyan); color: #000; font-weight: 800; padding: 15px; border-radius: 8px; text-transform: uppercase; border: none; cursor: pointer; text-align: center; }

/* Login */
.login-container { max-width: 400px; margin: 40px auto; padding: 30px; background: var(--bg-dark); border-radius: 12px; border: 1px solid #222; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.form-group input { width: 100%; padding: 15px; border-radius: 8px; background: #1a1a1a; border: 1px solid #333; color: #fff; font-size: 1rem; }
.form-group input:focus { outline: none; border-color: var(--cyan); }
.btn-primary { background: var(--cyan); color: #000; font-weight: 800; padding: 15px; border-radius: 8px; border: none; cursor: pointer; text-transform: uppercase; width: 100%; }
.alert-error { background: rgba(255, 71, 87, 0.1); color: var(--danger); padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; text-align: center; }

/* --- Bottom Sheet (Detalle Ejercicio) --- */
.bottom-sheet-overlay { display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.3s ease; }
.bottom-sheet-overlay.active { opacity: 1; }

.bottom-sheet { position: fixed; z-index: 1000; left: 0; bottom: -100%; width: 100%; background-color: var(--card-bg); border-top: 1px solid var(--cyan); border-radius: 20px 20px 0 0; padding: 25px 20px 40px; transition: bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); max-height: 85vh; overflow-y: auto; box-shadow: 0 -10px 40px rgba(0,0,0,0.8); }
.bottom-sheet.active { bottom: 0; }

.bs-drag-handle { width: 40px; height: 5px; background: #333; border-radius: 3px; margin: 0 auto 20px; }
.bs-close { position: absolute; right: 20px; top: 20px; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; line-height: 1; }
.bs-title { font-size: 1.3rem; font-weight: 800; color: var(--text-main); margin-bottom: 5px; padding-right: 30px; }
.bs-group { font-size: 0.85rem; color: var(--cyan); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }

/* Swiper en Bottom Sheet */
.bs-gallery { margin-bottom: 20px; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid #222; }
.bs-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: contain; display: block; }
.swiper-pagination-bullet { background: #555; }
.swiper-pagination-bullet-active { background: var(--cyan) !important; }

/* Contenido del Sheet */
.bs-desc { font-size: 0.9rem; color: #ccc; line-height: 1.5; margin-bottom: 20px; background: #1a1a1a; padding: 15px; border-radius: 8px; }
.bs-video-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #ff0000; color: white; padding: 12px; border-radius: 8px; font-weight: 600; text-transform: uppercase; margin-bottom: 10px; }
.bs-video-player { width: 100%; border-radius: 8px; background: #000; margin-bottom: 10px; border: 1px solid #333; outline: none; }