/* ============================================================
   Hotstar.site — design tokens
   Ink-navy surface, amber accent, Space Grotesk + Inter
   ============================================================ */
:root {
    --bg: #0B0E14;
    --surface: #141922;
    --surface-2: #1B212C;
    --border: #262E3B;
    --text: #E8EAED;
    --text-muted: #8D97A6;
    --accent: #F5A524;
    --accent-hover: #FFB94D;
    --danger: #E5484D;
    --success: #3FB950;
    --radius: 6px;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

img, video { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.5em; line-height: 1.25; }

p { color: var(--text-muted); }

/* ---- Header ---- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11,14,20,0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; gap: 24px;
    padding: 12px 20px;
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; flex-shrink: 0; }
.brand-mark { color: var(--accent); font-size: 1rem; }
.brand-dot { color: var(--accent); }
.search-form { flex: 1; max-width: 480px; display: flex; min-width: 0; }
.search-form input {
    flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border);
    border-right: none; border-radius: var(--radius) 0 0 var(--radius);
    padding: 9px 14px; color: var(--text); font-family: var(--font-body); font-size: 16px;
}
.search-form button {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-muted);
    padding: 0 16px; cursor: pointer; font-size: 1rem; flex-shrink: 0;
}
.search-form button:hover { color: var(--accent); }
.main-nav { display: flex; gap: 20px; margin-left: auto; font-size: 0.92rem; color: var(--text-muted); flex-shrink: 0; }
.main-nav a:hover { color: var(--text); }
.nav-toggle {
    display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; flex-shrink: 0;
}

/* ---- Layout ---- */
.site-main { max-width: 1400px; margin: 0 auto; padding: 28px 20px 60px; min-height: 60vh; }

.category-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.category-pills a {
    padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px;
    font-size: 0.85rem; color: var(--text-muted); white-space: nowrap;
}
.category-pills a.active, .category-pills a:hover { background: var(--accent); color: #17130A; border-color: var(--accent); }

/* ---- Video grid ---- */
.video-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}
.video-card { display: block; }
.video-thumb {
    position: relative; aspect-ratio: 16/9; background: var(--surface);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 10px;
    border: 1px solid var(--border);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .no-thumb { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 2rem; }
.video-duration {
    position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,0.8);
    color: #fff; font-size: 0.75rem; padding: 2px 6px; border-radius: 3px;
}
.video-title { font-size: 0.95rem; font-weight: 600; margin: 0 0 4px; color: var(--text); }
.video-meta { font-size: 0.82rem; color: var(--text-muted); }
.empty-state { color: var(--text-muted); text-align: center; padding: 60px 20px; }

/* ---- Watch page ---- */
.watch-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; max-width: 960px; margin: 0 auto; }
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.player-wrap video { width: 100%; display: block; max-height: 70vh; background: #000; }
.watch-title { font-size: 1.4rem; margin-top: 18px; }
.watch-meta-row { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.9rem; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.watch-description { white-space: pre-wrap; color: var(--text-muted); font-size: 0.92rem; }

/* ---- Static / legal pages ---- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 1.8rem; margin-bottom: 0.3em; }
.prose .updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2em; }
.prose h2 { font-size: 1.15rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--text-muted); font-size: 0.95rem; }
.prose ul { padding-left: 1.2em; }

/* ---- Forms ---- */
.form-card { max-width: 480px; margin: 40px auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-card h1 { font-size: 1.3rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
    width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 12px; color: var(--text); font-family: var(--font-body); font-size: 0.92rem;
}
.field textarea { resize: vertical; min-height: 120px; }
.btn {
    display: inline-block; background: var(--accent); color: #17130A; border: none;
    border-radius: var(--radius); padding: 10px 22px; font-weight: 600; font-size: 0.92rem;
    cursor: pointer; font-family: var(--font-body);
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 18px; }
.alert.success { background: rgba(63,185,80,0.12); border: 1px solid var(--success); color: var(--success); }
.alert.error { background: rgba(229,72,77,0.12); border: 1px solid var(--danger); color: var(--danger); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1400px; margin: 0 auto; padding: 40px 20px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-brand { max-width: 320px; }
.footer-brand p { font-size: 0.85rem; margin-top: 10px; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.footer-col a { display: block; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 8px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding: 18px; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); }

/* ---- Blog ---- */
.blog-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.blog-card { display: block; }
.blog-thumb {
    position: relative; aspect-ratio: 16/9; background: var(--surface);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 10px;
    border: 1px solid var(--border);
}
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-thumb .no-thumb { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 2rem; }
.blog-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.blog-excerpt { font-size: 0.88rem; margin: 0 0 8px; }
.blog-featured-image { width: 100%; border-radius: var(--radius); margin: 20px 0; border: 1px solid var(--border); }
.blog-content { color: var(--text); font-size: 1rem; line-height: 1.7; }
.blog-content p { color: var(--text); margin: 0 0 1.2em; }
.blog-content h2, .blog-content h3, .blog-content h4 { margin-top: 1.6em; }
.blog-content ul, .blog-content ol { color: var(--text); padding-left: 1.4em; margin-bottom: 1.2em; }
.blog-content a { color: var(--accent); text-decoration: underline; }
.blog-content img { border-radius: var(--radius); margin: 1em 0; }
.blog-content blockquote {
    border-left: 3px solid var(--accent); margin: 1.2em 0; padding: 4px 0 4px 16px;
    color: var(--text-muted); font-style: italic;
}

/* ---- Responsive ---- */

/* Tablet */
@media (max-width: 900px) {
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
    .site-main { padding: 20px 16px 48px; }
}

/* Phones */
@media (max-width: 640px) {
    .header-inner { flex-wrap: wrap; padding: 10px 14px; gap: 12px; }
    .brand { font-size: 1.1rem; }
    .search-form { order: 3; max-width: 100%; flex-basis: 100%; }
    .nav-toggle { display: block; margin-left: auto; }
    .main-nav {
        display: none; flex-direction: column; gap: 0; width: 100%;
        order: 4; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px;
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 10px 4px; font-size: 1rem; }

    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .video-title { font-size: 0.85rem; }
    .video-meta { font-size: 0.75rem; }
    .blog-grid { grid-template-columns: 1fr; gap: 18px; }

    .category-pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
    .category-pills::-webkit-scrollbar { display: none; }

    .watch-title { font-size: 1.15rem; }
    .watch-meta-row { flex-direction: column; align-items: flex-start; gap: 6px; }
    .player-wrap video { max-height: 50vh; }

    .form-card { margin: 20px auto; padding: 22px; border-radius: 0; border-left: none; border-right: none; }

    .footer-inner { flex-direction: column; gap: 28px; }
    .footer-links { gap: 32px; }
}

/* Very small phones */
@media (max-width: 380px) {
    .video-grid { grid-template-columns: 1fr; }
}

/* Prevent iOS zoom-on-focus and improve tap targets everywhere */
input, textarea, select, button { font-size: 16px; }
a, button { -webkit-tap-highlight-color: transparent; }
.btn, .category-pills a, .video-card { touch-action: manipulation; }