/* ============================================================
   HOOSHICO COURSES — MAIN CSS
   ============================================================ */
:root {
  --hc-green:    #12de3b;
  --hc-purple:   #c21095;
  --hc-bg:       #0c0c0e;
  --hc-surface:  #131316;
  --hc-surface2: #1a1a1f;
  --hc-surface3: #222228;
  --hc-border:   #2a2a33;
  --hc-text:     #ececf4;
  --hc-muted:    #7a7a94;
  --hc-radius:   10px;
  --sidebar-w:   300px;
}

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

html, body {
  height: 100%;
  background: var(--hc-bg);
  color: var(--hc-text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.hc-login-body {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.hc-login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(18,222,59,.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(194,16,149,.09) 0%, transparent 60%),
    var(--hc-bg);
}

.hc-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: 18px;
  padding: 40px 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
}

.hc-login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.hc-logo-icon { margin-bottom: 12px; }
.hc-login-logo h1 {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--hc-green), var(--hc-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.hc-login-logo p { color: var(--hc-muted); font-size: .875rem; }

.hc-form-group { margin-bottom: 18px; }
.hc-form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--hc-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 7px;
}
.hc-step-hint { font-size: .85rem; color: var(--hc-muted); margin-bottom: 10px; }
.hc-step-hint strong { color: var(--hc-text); }

.hc-input {
  width: 100%;
  background: var(--hc-surface2);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius);
  color: var(--hc-text);
  padding: 13px 16px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.hc-input:focus {
  border-color: var(--hc-green);
  box-shadow: 0 0 0 3px rgba(18,222,59,.12);
}
.hc-input-otp {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .25em;
  text-align: center;
}

.hc-btn {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: var(--hc-radius);
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .2s, transform .12s;
  text-align: center;
}
.hc-btn:active { transform: scale(.98); }
.hc-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.hc-btn-primary {
  background: linear-gradient(135deg, var(--hc-green) 0%, #0eb830 100%);
  color: #000;
}
.hc-btn-ghost {
  background: transparent;
  border: 1px solid var(--hc-border);
  color: var(--hc-muted);
}
.hc-btn-ghost:hover { color: var(--hc-text); border-color: var(--hc-muted); }

.hc-msg {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--hc-radius);
  font-size: .875rem;
  line-height: 1.4;
}
.hc-msg.success {
  background: rgba(18,222,59,.1);
  border: 1px solid rgba(18,222,59,.25);
  color: #5dfb7c;
}
.hc-msg.error {
  background: rgba(194,16,149,.1);
  border: 1px solid rgba(194,16,149,.3);
  color: #e055c0;
}

.hc-alert {
  padding: 11px 14px;
  border-radius: var(--hc-radius);
  font-size: .875rem;
  margin-bottom: 18px;
}
.hc-alert-warning {
  background: rgba(255,180,0,.1);
  border: 1px solid rgba(255,180,0,.25);
  color: #ffd04d;
}

/* ============================================================
   COURSES PAGE — FULL SCREEN LAYOUT
   ============================================================ */
.hc-courses-body {
  overflow: hidden;
  height: 100dvh;
}

.hc-app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.hc-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--hc-surface);
  border-right: 1px solid var(--hc-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hc-sidebar-header {
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--hc-border);
  flex-shrink: 0;
}

.hc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.hc-sidebar-brand span {
  font-weight: 700;
  font-size: .95rem;
  background: linear-gradient(135deg, var(--hc-green), var(--hc-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hc-sidebar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hc-user-name { font-size: .8rem; color: var(--hc-muted); }
.hc-logout-btn {
  background: none;
  border: 1px solid var(--hc-border);
  color: var(--hc-muted);
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: color .2s, border-color .2s;
}
.hc-logout-btn:hover { color: var(--hc-text); border-color: var(--hc-muted); }

/* Course list scroll area */
.hc-course-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.hc-course-list::-webkit-scrollbar { width: 4px; }
.hc-course-list::-webkit-scrollbar-track { background: transparent; }
.hc-course-list::-webkit-scrollbar-thumb { background: var(--hc-border); border-radius: 4px; }

/* Accordion: course header */
.hc-course-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: none;
  border: none;
  color: var(--hc-text);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.hc-course-header:hover { background: var(--hc-surface2); }
.hc-course-header.is-open { color: var(--hc-green); }

.hc-course-icon { color: var(--hc-muted); flex-shrink: 0; }
.hc-course-header.is-open .hc-course-icon { color: var(--hc-green); }
.hc-course-name { flex: 1; }
.hc-course-count {
  font-size: .7rem;
  background: var(--hc-surface3);
  color: var(--hc-muted);
  border-radius: 20px;
  padding: 2px 7px;
  flex-shrink: 0;
}
.hc-course-arrow {
  color: var(--hc-muted);
  flex-shrink: 0;
  transition: transform .2s;
}
.hc-course-header.is-open .hc-course-arrow { transform: rotate(180deg); }

/* Lesson list */
.hc-lesson-list {
  display: none;
  background: var(--hc-surface2);
  border-top: 1px solid var(--hc-border);
  border-bottom: 1px solid var(--hc-border);
}
.hc-lesson-list.is-open { display: block; }

.hc-lesson-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 28px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--hc-muted);
  font-family: inherit;
  font-size: .83rem;
  cursor: pointer;
  text-align: left;
  transition: color .15s, background .15s, border-color .15s;
}
.hc-lesson-item:hover { color: var(--hc-text); background: rgba(255,255,255,.03); }
.hc-lesson-item.is-active {
  color: var(--hc-green);
  border-left-color: var(--hc-green);
  background: rgba(18,222,59,.06);
}

.hc-lesson-play { flex-shrink: 0; }
.hc-lesson-name { flex: 1; }
.hc-lesson-dur { font-size: .75rem; color: var(--hc-muted); flex-shrink: 0; }
.hc-lesson-empty { padding: 10px 14px 10px 28px; font-size: .8rem; color: var(--hc-muted); }
.hc-empty { padding: 24px 16px; font-size: .875rem; color: var(--hc-muted); text-align: center; }

/* ---- Main player area ---- */
.hc-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hc-player-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 32px;
  overflow-y: auto;
}
.hc-player-wrap::-webkit-scrollbar { width: 4px; }
.hc-player-wrap::-webkit-scrollbar-thumb { background: var(--hc-border); border-radius: 4px; }

/* Placeholder */
.hc-placeholder {
  text-align: center;
  color: var(--hc-muted);
  opacity: .5;
}
.hc-placeholder svg { margin-bottom: 14px; }
.hc-placeholder p { font-size: .95rem; }

/* Player inner */
.hc-player-inner {
  width: 100%;
  max-width: 960px;
}

.hc-video-meta {
  margin-bottom: 14px;
}
.hc-video-meta h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--hc-text);
  margin-bottom: 2px;
}
.hc-video-meta span {
  font-size: .82rem;
  color: var(--hc-muted);
}

.hc-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hc-border);
}
.hc-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.hc-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hc-muted);
  font-size: .9rem;
  background: #000;
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 720px) {

  .hc-courses-body { overflow: auto; height: auto; }

  .hc-app {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }

  /* Video player sticks to top on mobile */
  .hc-main {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--hc-bg);
    border-bottom: 1px solid var(--hc-border);
  }

  .hc-player-wrap {
    padding: 12px;
    min-height: unset;
    align-items: flex-start;
  }

  .hc-player-inner { max-width: 100%; }
  .hc-placeholder { padding: 20px 0; }

  /* Sidebar below player */
  .hc-sidebar {
    width: 100%;
    border-right: none;
    border-top: 1px solid var(--hc-border);
    max-height: none;
    overflow: visible;
  }

  .hc-course-list {
    overflow: visible;
    max-height: none;
  }
}
