/* ============================================================
   HP Videos Archive — Estilos
   Paleta: Azul HP corporativo + grises profesionales
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --hp-blue:       #0096d6;
    --hp-dark-blue:  #005073;
    --hp-navy:       #001f3f;
    --text-primary:  #1a1a2e;
    --text-secondary:#4a5568;
    --text-muted:    #718096;
    --bg-page:       #f0f4f8;
    --bg-card:       #ffffff;
    --bg-header:     #001f3f;
    --border:        #e2e8f0;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:     0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg:     0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --radius:        8px;
    --radius-lg:     12px;
}

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: var(--text-primary);
    background: var(--bg-page);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--hp-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Botones ─────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem 1.2rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
    text-decoration: none;
    white-space: nowrap;
    background: none;
    font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--hp-blue);
    color: #fff;
    border-color: var(--hp-blue);
}
.btn-primary:hover { background: var(--hp-dark-blue); border-color: var(--hp-dark-blue); color: #fff; }

.btn-secondary {
    background: transparent;
    color: var(--hp-blue);
    border-color: var(--hp-blue);
}
.btn-secondary:hover { background: var(--hp-blue); color: #fff; }

.btn-ghost {
    color: rgba(255,255,255,.8);
    border-color: rgba(255,255,255,.3);
}
.btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,.1); }

.btn-full { width: 100%; }
.btn-sm { padding: .35rem .85rem; font-size: .82rem; }
.btn-lg { padding: .8rem 2rem; font-size: 1rem; }

/* ── Header ──────────────────────────────────────────────── */

.site-header {
    background: var(--bg-header);
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-hp-small {
    display: inline-block;
    background: var(--hp-blue);
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -.05em;
    padding: .2rem .55rem;
    border-radius: 4px;
    line-height: 1;
}

.header-logo-img {
    display: block;
    flex-shrink: 0;
}

.header-logo-hp {
    height: 28px;
    width: auto;
    max-height: 28px;
}

.header-logo-compaq {
    height: 16px;
    width: auto;
    max-height: 16px;
}

.header-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 400;
    opacity: .9;
}

.header-nav {
    display: flex;
    gap: .5rem;
}

/* ── Página de Login ─────────────────────────────────────── */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--hp-navy) 0%, #003a5c 50%, #005073 100%);
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 2rem 1rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.brand-logo {
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}

.brand-logo-hp {
    height: 72px;
    width: auto;
}

.brand-logo-compaq {
    height: 44px;
    width: auto;
    /* El logo Compaq tiene fondo blanco/transparente — lo aclaramos sobre el fondo oscuro */
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.3)) brightness(1.05);
}

.logo-subtitle {
    color: rgba(255,255,255,.7);
    font-size: .95rem;
    letter-spacing: .02em;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0,150,214,.15);
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .5rem;
}

.login-description {
    color: var(--text-secondary);
    font-size: .9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.login-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.login-footer p {
    color: var(--text-muted);
    font-size: .85rem;
    margin-bottom: .75rem;
}

.login-footer .btn-ghost {
    color: var(--text-secondary);
    border-color: var(--border);
}
.login-footer .btn-ghost:hover { background: var(--bg-page); color: var(--text-primary); }

.page-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255,255,255,.4);
    font-size: .78rem;
}

/* ── Formularios ─────────────────────────────────────────── */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: .4rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: .7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--hp-blue);
    box-shadow: 0 0 0 3px rgba(0,150,214,.15);
}

/* ── Alertas ─────────────────────────────────────────────── */

.alert {
    padding: .85rem 1rem;
    border-radius: var(--radius);
    font-size: .88rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.alert-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

/* ── Estado de éxito ─────────────────────────────────────── */

.success-state {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    width: 56px;
    height: 56px;
    background: #c6f6d5;
    color: #276749;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.25rem;
}

.success-state h2 {
    font-size: 1.3rem;
    margin-bottom: .5rem;
}

.success-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: .92rem;
}

/* ── Página de videos ────────────────────────────────────── */

.videos-page, .view-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    width: 100%;
}

.page-header-section {
    margin-bottom: 2.5rem;
}

.page-header-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hp-navy);
    margin-bottom: .4rem;
}

.page-header-section p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ── Grid de videos ──────────────────────────────────────── */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}

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

.video-thumb {
    display: block;
    background: linear-gradient(135deg, var(--hp-navy) 0%, #005073 100%);
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.thumb-play {
    color: rgba(255,255,255,.7);
    font-size: 2.5rem;
    transition: color .2s, transform .2s;
}

.video-card:hover .thumb-play {
    color: var(--hp-blue);
    transform: scale(1.15);
}

.thumb-ext {
    color: rgba(255,255,255,.4);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    border: 1px solid rgba(255,255,255,.2);
    padding: .1rem .4rem;
    border-radius: 3px;
}

.video-info {
    padding: 1.1rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

.video-title {
    font-size: .97rem;
    font-weight: 600;
    line-height: 1.3;
}

.video-title a {
    color: var(--text-primary);
}

.video-title a:hover {
    color: var(--hp-blue);
    text-decoration: none;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: .8rem;
    color: var(--text-muted);
}

.video-actions {
    display: flex;
    gap: .5rem;
    margin-top: auto;
    padding-top: .5rem;
}

.video-count {
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: .85rem;
    text-align: right;
}

/* ── Estado vacío ────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    opacity: .3;
    margin-bottom: 1rem;
}

/* ── Reproductor ─────────────────────────────────────────── */

.view-main {
    padding-top: 2rem;
}

.video-title-bar {
    margin-bottom: 1.25rem;
}

.video-title-bar h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--hp-navy);
}

.player-container {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.25rem;
}

.video-player {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
}

.no-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: rgba(255,255,255,.7);
    text-align: center;
    gap: 1rem;
}

.no-player-icon {
    font-size: 3rem;
    opacity: .4;
}

.video-detail-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.video-detail-actions .btn-ghost {
    color: var(--text-secondary);
    border-color: var(--border);
}
.video-detail-actions .btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
    background: var(--bg-header);
    color: rgba(255,255,255,.4);
    text-align: center;
    padding: 1.2rem;
    font-size: .78rem;
    margin-top: auto;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 640px) {
    .header-title { display: none; }
    .login-card { padding: 2rem 1.25rem; }
    .video-grid { grid-template-columns: 1fr; }
    .page-header-section h1 { font-size: 1.5rem; }
    .main-content { padding: 1.5rem 1rem; }
    .video-title-bar h1 { font-size: 1.2rem; }
    .brand-logo-hp { height: 56px; }
    .brand-logo-compaq { height: 34px; }
    .brand-logos { gap: 1.25rem; }
    .header-logo-hp { height: 22px; }
    .header-logo-compaq { height: 13px; }
    .header-title { display: none; }
}
