/* ==========================================================================
   NIXCORD GYM - Estilos del Catálogo de Ejercicios y Acceso de Atletas
   ========================================================================== */

:root {
    --bg-dark: #090d16;
    --card-bg: #111827;
    --card-hover: #1f293d;
    --border-color: rgba(255, 255, 255, 0.08);
    --primary-amber: #f59e0b;
    --primary-orange: #d97706;
    --accent-blue: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger-red: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 60px;
    position: relative;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   1. Estilos para Login / Acceso por Cédula (login.php)
   -------------------------------------------------------------------------- */
body.page-login {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: 20px;
}

.bg-glow-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.25;
}

.blob-1 {
    width: 350px;
    height: 350px;
    background: #f59e0b;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #d97706;
    bottom: -150px;
    right: -100px;
}

.login-card {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
    text-align: center;
}

.logo-wrapper {
    margin: 0 auto 20px;
    width: 90px;
    height: 90px;
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
}

.logo-wrapper img {
    max-width: 55px;
    max-height: 55px;
    object-fit: contain;
}

.title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px 14px 46px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
}

.form-input:focus {
    border-color: var(--primary-amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    background: rgba(15, 23, 42, 0.9);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-amber) 0%, var(--primary-orange) 100%);
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    padding: 15px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(245, 158, 11, 0.5);
}

.btn-submit:active {
    transform: translateY(0);
}

.footer-note {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-note a {
    color: var(--primary-amber);
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   2. Estilos para la Vista Principal del Catálogo (index.php)
   -------------------------------------------------------------------------- */
.navbar {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.athlete-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.athlete-info {
    text-align: right;
}

.athlete-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.athlete-tag {
    font-size: 12px;
    color: var(--primary-amber);
    font-weight: 500;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
}

.hero-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.hero-text h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.hero-text p {
    font-size: 14px;
    color: var(--text-muted);
}

.stats-badge {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary-amber);
}

.filter-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
}

.search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.search-box {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.search-box input {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px 12px 42px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: var(--primary-amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.select-filter {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    min-width: 180px;
    cursor: pointer;
}

.chips-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.chip:hover, .chip.active {
    background: var(--primary-amber);
    color: #000;
    font-weight: 700;
    border-color: var(--primary-amber);
}

.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.5);
    background: var(--card-hover);
}

.card-media {
    width: 100%;
    height: 200px;
    background: #0f172a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-media img {
    transform: scale(1.05);
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    text-transform: capitalize;
    line-height: 1.3;
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: capitalize;
}

.badge-muscle {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-equipment {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-detail {
    margin-top: auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.card:hover .btn-detail {
    background: var(--primary-amber);
    color: #000;
    border-color: var(--primary-amber);
    font-weight: 700;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.5);
}

.modal-preview {
    width: 100%;
    max-height: 280px;
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.modal-preview img {
    max-height: 280px;
    object-fit: contain;
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    text-transform: capitalize;
    margin-bottom: 12px;
    color: #ffffff;
}

.steps-list {
    margin-top: 16px;
    list-style: none;
}

.step-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--primary-amber);
    padding: 12px 16px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #cbd5e1;
}

.load-more-container {
    text-align: center;
    margin-top: 36px;
}

.btn-load-more {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--primary-amber);
    color: var(--primary-amber);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-load-more:hover {
    background: var(--primary-amber);
    color: #000;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--primary-amber);
}
