.emby-login-card { width: min(760px, 100%); margin: 0 auto; padding: 34px; }
.emby-login-card h2 { margin: 12px 0 8px; font-size: clamp(30px, 5vw, 48px); }
.emby-login-card > p { margin: 0 0 20px; color: var(--muted); line-height: 1.7; }
.emby-login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.emby-security-note { color: var(--muted); font-size: 11px; line-height: 1.6; }

.emby-browser { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 25px; background: rgba(6, 18, 29, .72); min-height: 680px; }
.emby-toolbar { display: flex; align-items: center; gap: 10px; padding: 18px 22px; }
.emby-toolbar > div:first-child { min-width: 150px; margin-right: auto; }
.emby-toolbar h2, .emby-toolbar p { margin: 0; }
.emby-toolbar h2 { margin-top: 3px; font-size: 25px; }
.emby-toolbar p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.emby-search { display: flex; width: min(390px, 42vw); }
.emby-search input { border-radius: 14px 0 0 14px; }
.emby-search button { border: 1px solid rgba(117, 216, 233, .35); border-left: 0; border-radius: 0 14px 14px 0; background: rgba(117, 216, 233, .13); color: var(--text); padding: 0 16px; }

.emby-libraries { display: flex; gap: 8px; overflow-x: auto; padding: 4px 22px 14px; scrollbar-width: none; }
.emby-libraries::-webkit-scrollbar { display: none; }
.emby-library { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--text); padding: 9px 14px; font-weight: 700; }
.emby-library.active { border-color: transparent; background: var(--cyan); color: var(--bg); }
.emby-breadcrumb { padding: 2px 22px 12px; color: var(--muted); font-size: 12px; }
.emby-breadcrumb button { border: 0; background: transparent; color: var(--cyan); padding: 0; }

.emby-hero { position: relative; min-height: 350px; overflow: hidden; background-position: center; background-size: cover; }
.emby-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 17, 28, .96), rgba(5, 17, 28, .38) 62%, transparent), linear-gradient(0deg, rgba(5, 17, 28, .98), transparent 70%); }
.emby-hero-copy { position: relative; z-index: 1; width: min(570px, 86%); padding: 76px 28px 30px; }
.emby-hero-copy h2 { margin: 9px 0; font-size: clamp(31px, 6vw, 54px); line-height: 1.03; }
.emby-hero-copy p { display: -webkit-box; margin: 8px 0; overflow: hidden; color: #bfd0d7; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.emby-hero-copy button, .emby-play-button { border: 0; border-radius: 14px; background: var(--cyan); color: var(--bg); padding: 11px 17px; font-weight: 800; }

.emby-section { padding: 22px; }
.emby-section-title { display: flex; align-items: end; gap: 9px; margin-bottom: 14px; }
.emby-section-title h3 { margin: 0; font-size: 18px; }
.emby-section-title span { color: var(--muted); font-size: 11px; }
.emby-section-title select { width: auto; margin-left: auto; padding: 8px 12px; }
.emby-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 12px; }
.emby-card { min-width: 0; border: 0; background: transparent; color: var(--text); padding: 0; text-align: left; }
.emby-poster { position: relative; overflow: hidden; aspect-ratio: .68; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #173449, #0d2233); }
.emby-poster img, .emby-landscape img, .emby-detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.emby-poster-fallback { display: grid; width: 100%; height: 100%; place-items: center; color: var(--muted); }
.emby-card strong, .emby-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emby-card strong { margin-top: 8px; font-size: 13px; }
.emby-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.emby-card:hover .emby-poster { transform: translateY(-2px); border-color: rgba(117, 216, 233, .5); }

.emby-landscape-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 5px; }
.emby-landscape-card { flex: 0 0 250px; border: 0; background: transparent; color: var(--text); padding: 0; text-align: left; }
.emby-landscape { overflow: hidden; aspect-ratio: 1.78; border-radius: 13px; background: #10283c; }
.emby-landscape-card strong { display: block; margin: 7px 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emby-progress { height: 3px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .13); }
.emby-progress span { display: block; height: 100%; background: var(--cyan); }
.emby-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 220px; color: var(--muted); }
.emby-loading .loader { width: 25px; height: 25px; }

.emby-detail { position: absolute; z-index: 4; inset: 0; overflow-y: auto; background: #07131f; }
.emby-detail-close { position: absolute; z-index: 2; top: 15px; left: 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(3, 13, 22, .75); color: var(--text); padding: 9px 13px; }
.emby-detail-hero { position: relative; height: 340px; }
.emby-detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #07131f 2%, transparent 78%); }
.emby-detail-body { padding: 0 26px 34px; }
.emby-detail-body h2 { margin: 0 0 8px; font-size: clamp(32px, 6vw, 55px); }
.emby-detail-body > p { max-width: 850px; color: #b9cdd5; line-height: 1.7; }
.emby-cast, .emby-episodes, .emby-seasons { display: flex; gap: 10px; overflow-x: auto; margin: 13px 0 22px; }
.emby-person { flex: 0 0 86px; }
.emby-person img, .emby-person .emby-person-fallback { width: 86px; height: 112px; border-radius: 11px; object-fit: cover; background: var(--panel); }
.emby-person-fallback { display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.emby-person strong, .emby-person small { display: block; margin-top: 5px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.emby-person small { color: var(--muted); }
.emby-season { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); padding: 9px 14px; }
.emby-season.active { border-color: transparent; background: var(--cyan); color: var(--bg); }
.emby-episode { flex: 0 0 250px; border: 0; background: transparent; color: var(--text); padding: 0; text-align: left; }
.emby-episode strong, .emby-episode small { display: block; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emby-episode small { color: var(--muted); }

.emby-player-modal { position: fixed; z-index: 40; inset: 0; display: grid; grid-template-rows: auto 1fr; background: #000; }
.emby-player-top { display: flex; align-items: center; gap: 15px; min-height: 56px; padding: 8px 14px; color: white; }
.emby-player-top button { border: 0; background: transparent; color: white; padding: 8px; }
.emby-player-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#emby-player { width: 100%; height: 100%; background: #000; }

@media (max-width: 900px) { .emby-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .emby-login-card { padding: 24px; }
  .emby-login-grid { grid-template-columns: 1fr; gap: 0; }
  .emby-browser { min-height: calc(100vh - 170px); border-radius: 20px; }
  .emby-toolbar { flex-wrap: wrap; padding: 16px; }
  .emby-toolbar > div:first-child { flex: 1; }
  .emby-search { order: 2; width: 100%; }
  .emby-toolbar .ghost { padding: 8px; }
  .emby-libraries { padding-right: 16px; padding-left: 16px; }
  .emby-hero { min-height: 330px; }
  .emby-hero-copy { padding: 86px 20px 24px; }
  .emby-section { padding: 18px 16px; }
  .emby-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 9px; }
  .emby-detail-hero { height: 280px; }
  .emby-detail-body { padding: 0 18px 28px; }
}

@media (max-width: 430px) { .emby-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
