* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #f59e0b;
    --bg: #f3f4f6;
    --dark: #1f2937;
    --success: #10b981;
    --danger: #ef4444;
}

body { background: var(--bg); color: var(--dark); min-height: 100vh; }

/* Navbar */
.navbar {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white; padding: 15px 30px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar h1 { font-size: 1.5rem; }
.navbar nav a {
    color: white; text-decoration: none; margin-left: 20px;
    padding: 8px 15px; border-radius: 6px; transition: 0.3s;
}
.navbar nav a:hover { background: rgba(255,255,255,0.2); }

/* Contenedor principal */
.container { max-width: 1200px; margin: 30px auto; padding: 0 20px; }

/* Cards */
.card {
    background: white; border-radius: 12px; padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); margin-bottom: 20px;
}
.card h2 { color: var(--primary); margin-bottom: 15px; }

/* Formularios */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px; border: 1px solid #d1d5db;
    border-radius: 6px; font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary);
}

/* Botones */
.btn {
    display: inline-block; padding: 10px 20px;
    background: var(--primary); color: white; border: none;
    border-radius: 6px; cursor: pointer; text-decoration: none;
    font-size: 1rem; transition: 0.3s;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-warning { background: var(--secondary); }

/* Grid de cursos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.curso-card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: 0.3s;
}
.curso-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.curso-card .header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; padding: 30px; text-align: center;
}
.curso-card .body { padding: 20px; }

/* Lista de clases */
.clase-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; border-bottom: 1px solid #e5e7eb;
}
.clase-item:hover { background: #f9fafb; }
.clase-num {
    background: var(--primary); color: white;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; margin-right: 15px; flex-shrink: 0;
}

/* Video */
.video-container {
    position: relative; padding-bottom: 56.25%; height: 0;
    overflow: hidden; border-radius: 10px; background: #000;
}
.video-container video, .video-container iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Foro */
.mensaje-foro {
    background: #f9fafb; padding: 15px; border-radius: 8px;
    margin-bottom: 10px; border-left: 4px solid var(--primary);
}
.mensaje-foro .autor { font-weight: bold; color: var(--primary); }
.mensaje-foro .fecha { font-size: 0.85rem; color: #6b7280; }

/* Alertas */
.alert { padding: 12px; border-radius: 6px; margin-bottom: 15px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Badges */
.badge {
    display: inline-block; padding: 4px 10px; border-radius: 12px;
    font-size: 0.85rem; font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* Tabla */
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
table th { background: #f3f4f6; font-weight: 600; }

/* Login */
.login-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.login-box {
    background: white; padding: 40px; border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 100%; max-width: 400px;
}
.login-box h1 { text-align: center; color: var(--primary); margin-bottom: 10px; }
.login-box .subtitle { text-align: center; color: #6b7280; margin-bottom: 25px; }

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 10px; }
    .navbar nav a { margin: 0 5px; }
}