/* TollywoodTunes — shared Phase-1 stylesheet
   Deep blue (#1F3864) primary, saffron (#F39C12) accent.
   Replace with your finalised brand at any time. */

:root {
    --color-primary: #1F3864;
    --color-primary-dark: #142544;
    --color-accent: #F39C12;
    --color-accent-dark: #C77F0B;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-bg: #fafbfc;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-error: #b91c1c;
    --color-success: #166534;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; display: block; }

/* ---- Layout ---- */
.tt-container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.tt-narrow    { max-width: 460px;  margin: 0 auto; padding: 0 16px; }

/* ---- Header ---- */
.tt-header {
    background: var(--color-primary);
    color: #fff;
    padding: 14px 0;
    box-shadow: var(--shadow-sm);
}
.tt-header .tt-container {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
}
.tt-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    line-height: 0;
}
.tt-header__brand:hover { text-decoration: none; opacity: 0.92; }
.tt-header__brand img {
    height: 35px;
    width: auto;
    display: block;
}
.tt-header__brand-suffix {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    line-height: 35px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.25);
}
@media (max-width: 480px) {
    .tt-header__brand img { height: 30px; }
}

.tt-header__nav { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.tt-header__nav a { color: rgba(255,255,255,0.85); }
.tt-header__nav a:hover { color: #fff; }
.tt-header__user { color: rgba(255,255,255,0.9); font-size: 13px; }
.tt-header__user strong { color: var(--color-accent); font-weight: 600; }

/* ---- Buttons ---- */
.tt-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    font-size: 15px;
    transition: background 120ms ease;
}
.tt-btn:hover { background: var(--color-primary-dark); text-decoration: none; }
.tt-btn--accent { background: var(--color-accent); }
.tt-btn--accent:hover { background: var(--color-accent-dark); }
.tt-btn--ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.6);
}
.tt-btn--ghost:hover { background: rgba(255,255,255,0.1); }
.tt-btn--block { display: block; width: 100%; }

/* ---- Forms ---- */
.tt-form {
    background: var(--color-surface);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.tt-form h1 { margin-top: 0; font-size: 24px; }
.tt-form label {
    display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px;
}
.tt-form input[type=email],
.tt-form input[type=password],
.tt-form input[type=text] {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font: inherit; font-size: 15px;
}
.tt-form input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
    border-color: var(--color-primary);
}
.tt-form .tt-form__row { margin-top: 18px; }
.tt-form__hint { color: var(--color-muted); font-size: 13px; margin-top: 4px; }

/* ---- Alerts ---- */
.tt-alert {
    padding: 10px 14px; border-radius: var(--radius);
    margin: 0 0 14px; font-size: 14px;
}
.tt-alert--error   { background: #fee2e2; color: var(--color-error); }
.tt-alert--success { background: #dcfce7; color: var(--color-success); }
.tt-alert--info    { background: #dbeafe; color: #1e3a8a; }

/* ---- Choice cards (landing page) ---- */
.tt-hero {
    text-align: center; padding: 56px 16px 24px;
}
.tt-hero h1 { font-size: 36px; margin: 0 0 8px; color: var(--color-primary); }
.tt-hero p  { font-size: 17px; color: var(--color-muted); margin: 0 0 8px; }

.tt-choices {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; padding: 40px 0;
}
@media (max-width: 900px) {
    .tt-choices { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .tt-choices { grid-template-columns: 1fr; }
}
.tt-choice {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 32px 24px;
    text-align: center;
    transition: transform 160ms ease, box-shadow 160ms ease;
    display: block;
    color: inherit;
}
.tt-choice:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    text-decoration: none;
}
.tt-choice__badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
}
.tt-choice h2 { margin: 14px 0 8px; font-size: 24px; color: var(--color-primary); }
.tt-choice p  { color: var(--color-muted); font-size: 14px; margin: 0 0 16px; }
.tt-choice__cta {
    color: var(--color-primary); font-weight: 700; font-size: 14px;
    letter-spacing: 0.3px;
}

/* ---- Footer ---- */
.tt-footer {
    margin-top: 60px; padding: 24px 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 13px;
    text-align: center;
}
.tt-footer a { color: var(--color-muted); margin: 0 6px; }

/* ---- Utility ---- */
.tt-mt-lg { margin-top: 24px; }
.tt-text-center { text-align: center; }

/* =====================================================================
   Admin styles (Phase 2a)
   ===================================================================== */
.tt-admin {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 64px);
}
.tt-admin__sidebar {
    background: #0f1c33;
    color: #cbd5e1;
    padding: 18px 0;
    font-size: 14px;
}
.tt-admin__nav-group {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 18px 18px 8px;
}
.tt-admin__nav-item {
    display: block;
    padding: 9px 18px;
    color: #cbd5e1;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.tt-admin__nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: #ffffff;
    text-decoration: none;
}
.tt-admin__nav-item.is-active {
    background: rgba(243,156,18,0.10);
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    font-weight: 600;
}
.tt-admin__main {
    padding: 28px 32px;
    background: var(--color-bg);
}
.tt-admin__title {
    margin: 0 0 4px;
    font-size: 26px;
    color: var(--color-primary);
}
.tt-admin__lede {
    color: var(--color-muted);
    margin: 0 0 18px;
}
.tt-admin__header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 18px;
    flex-wrap: wrap;
}

@media (max-width: 800px) {
    .tt-admin { grid-template-columns: 1fr; }
    .tt-admin__sidebar { display: flex; flex-wrap: wrap; padding: 8px; }
    .tt-admin__nav-group { display: none; }
    .tt-admin__nav-item { border-left: 0; border-bottom: 3px solid transparent; }
    .tt-admin__nav-item.is-active { border-left: 0; border-bottom-color: var(--color-accent); }
}

.tt-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.tt-stat {
    display: block; padding: 18px 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none; color: inherit;
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.tt-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.tt-stat__label {
    display: block;
    color: var(--color-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}
.tt-stat__value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
}

.tt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 14px;
}
.tt-table th, .tt-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.tt-table th {
    background: #f3f4f6;
    font-weight: 600;
    font-size: 12px;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.tt-table tr:last-child td { border-bottom: 0; }
.tt-table code {
    font-size: 12px;
    color: var(--color-muted);
}

.tt-kv {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 6px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 0 0 24px;
    font-size: 14px;
}
.tt-kv dt {
    color: var(--color-muted);
    font-weight: 500;
}
.tt-kv dd {
    margin: 0;
}

select, textarea {
    font: inherit;
    color: inherit;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 8px 10px;
}
select:focus, textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

/* =====================================================================
   Public-page styles (Phase 2b)
   ===================================================================== */

.tt-header__search {
    display: inline-block;
    margin: 0;
}
.tt-header__search input {
    width: 220px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    color: #fff;
    font: inherit;
    font-size: 14px;
}
.tt-header__search input::placeholder { color: rgba(255,255,255,0.55); }
.tt-header__search input:focus {
    outline: 2px solid var(--color-accent);
    background: rgba(255,255,255,0.18);
}
@media (max-width: 720px) {
    .tt-header__search input { width: 140px; }
}

.tt-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 16px 64px;
}
.tt-page__title {
    font-size: 28px;
    margin: 0 0 6px;
    color: var(--color-primary);
}
.tt-page__lede {
    color: var(--color-muted);
    margin: 0 0 24px;
}

/* Section heading + "view all" link, used on home pages */
.tt-section {
    display: flex; align-items: baseline; justify-content: space-between;
    margin: 36px 0 14px; gap: 16px;
}
.tt-section h2 {
    margin: 0; font-size: 20px;
    color: var(--color-primary);
}
.tt-section__more {
    font-size: 13px; font-weight: 600;
}

/* Card grid for content listings */
.tt-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.tt-pc {
    display: block; padding: 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none; color: inherit;
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.tt-pc:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.tt-pc__eyebrow {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 6px;
}
.tt-pc__title {
    margin: 0 0 6px;
    font-size: 16px; line-height: 1.35;
    color: var(--color-primary);
}
.tt-pc__excerpt {
    color: var(--color-muted);
    font-size: 14px;
    margin: 0;
}
.tt-pc__meta {
    display: block;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 12px;
}

/* Article / song detail page */
.tt-article {
    max-width: 720px;
    margin: 0 auto;
}
.tt-article h1 {
    font-size: 32px;
    color: var(--color-primary);
    margin: 0 0 8px;
}
.tt-article__meta {
    color: var(--color-muted);
    font-size: 14px;
    margin: 0 0 24px;
}
.tt-article__body {
    font-size: 17px; line-height: 1.7;
}
.tt-article__body p { margin: 0 0 1em; }
.tt-article__body h2 { font-size: 22px; margin: 1.6em 0 0.4em; color: var(--color-primary); }
.tt-article__body h3 { font-size: 18px; margin: 1.4em 0 0.4em; }
.tt-article__body a { color: var(--color-primary); border-bottom: 1px solid var(--color-border); }
.tt-article__body img { margin: 1em 0; border-radius: var(--radius); }
.tt-article__body blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: 16px; color: var(--color-muted); margin: 1em 0;
    font-style: italic;
}

/* Audio player block */
.tt-player {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 16px 0 24px;
}
.tt-player audio { width: 100%; display: block; }
.tt-player__details {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 13px;
}

/* Movie / track-list page */
.tt-track-list {
    list-style: none; padding: 0; margin: 24px 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
}
.tt-track-list li {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}
.tt-track-list li:last-child { border-bottom: 0; }
.tt-track-list__no {
    color: var(--color-muted); font-variant-numeric: tabular-nums;
    font-size: 13px;
}
.tt-track-list__title {
    font-weight: 500;
}
.tt-track-list__title small {
    display: block; color: var(--color-muted); font-weight: 400; font-size: 12px; margin-top: 2px;
}
.tt-track-list__dur {
    color: var(--color-muted); font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* Pagination */
.tt-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin: 32px 0 0;
}
.tt-pagination__link {
    padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    font-weight: 500; font-size: 14px;
    text-decoration: none;
}
.tt-pagination__link:hover {
    background: var(--color-primary); color: #fff; text-decoration: none;
}
.tt-pagination__link.is-disabled {
    color: var(--color-muted); background: var(--color-bg);
    pointer-events: none; opacity: 0.6;
}
.tt-pagination__page {
    color: var(--color-muted); font-size: 13px;
}

/* Empty state */
.tt-empty {
    padding: 32px;
    text-align: center;
    color: var(--color-muted);
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
}

/* Breadcrumb / back link */
.tt-back {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px; color: var(--color-muted);
}

/* ==========================================================================
   Phase 4 — ad slots
   ========================================================================== */

/* Wrapper: every ad slot announces itself with a small label and a tiny
   "Report this ad" link. Tight padding so the slot doesn't dominate the
   layout, and a light surface so it visually reads as "this is an ad". */
.tt-ad {
    margin: 16px auto;
    padding: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    min-height: 90px;
    box-sizing: border-box;
}
.tt-ad__label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-muted);
    margin-bottom: 6px;
}
.tt-ad__report {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 10px;
    color: var(--color-muted);
    text-decoration: underline;
    opacity: 0.6;
}
.tt-ad__report:hover { opacity: 1; }

.tt-ad--leaderboard { max-width: 970px; min-height: 100px; }
.tt-ad--in-content  { max-width: 728px; min-height: 280px; margin: 24px auto; }
.tt-ad--footer      { max-width: 970px; min-height: 100px; }

/* Sidebar: only renders on desktop. Hidden on small screens to protect CLS. */
.tt-ad--sidebar { width: 300px; min-height: 600px; margin: 0; }
.tt-ad--sticky  { position: sticky; top: 16px; }

/* Layout wrapper that puts the sidebar to the right of main on desktop. */
.tt-layout--with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.tt-layout__sidebar { min-width: 0; }
@media (max-width: 960px) {
    .tt-layout--with-sidebar { grid-template-columns: 1fr; }
    .tt-ad--sidebar          { display: none; }
}

/* Phase 4.1 — main-site cross-subdomain subnav strip */
.tt-subnav {
    display: flex;
    gap: 20px;
    padding: 8px 16px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
}
.tt-subnav a {
    color: var(--color-muted);
    text-decoration: none;
}
.tt-subnav a:hover { color: var(--color-primary); }

.tt-header__nav-link {
    margin-right: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
}
.tt-header__nav-link:hover { color: var(--color-primary); }

/* =========================================================================
   Phase 4.2 — top-right cross-domain pills + below-logo section nav
   ========================================================================= */

/* Top-right Bollywood / Tollywood / Devotional as pills.
   Active site (matches current subdomain) is filled with the accent. */
.tt-header__cross-link {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 4px;
    border-radius: 999px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tt-header__cross-link:hover {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-primary);
}
.tt-header__cross-link.is-active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Small vertical divider between the cross-domain pills and the auth controls. */
.tt-header__divider {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: var(--color-border);
    margin: 0 8px;
    vertical-align: middle;
}

/* The section nav strip lives in its own band below the logo header,
   so it can pop visually without crowding the brand row. Gradient + thin
   accent stripe + subtle shadow make it feel like a "category bar". */
.tt-sectionnav {
    background: linear-gradient(
        180deg,
        var(--color-primary) 0%,
        color-mix(in srgb, var(--color-primary) 85%, #000) 100%
    );
    border-top: 1px solid color-mix(in srgb, var(--color-primary) 80%, #000);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin-bottom: 8px;
}

.tt-sectionnav__inner {
    overflow-x: auto;          /* let it scroll on mobile rather than wrap */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tt-sectionnav__inner::-webkit-scrollbar { display: none; }

.tt-sectionnav__list {
    display: flex;
    gap: 4px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.tt-sectionnav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.15s, background 0.15s;
}
.tt-sectionnav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Subtle underline that grows on hover. */
.tt-sectionnav__link::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 6px;
    height: 2px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
    border-radius: 1px;
}
.tt-sectionnav__link:hover::after,
.tt-sectionnav__link.is-active::after {
    transform: scaleX(1);
}

.tt-sectionnav__link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* Mobile: a touch tighter so more links are visible at once. */
@media (max-width: 640px) {
    .tt-sectionnav__link { padding: 10px 12px; font-size: 13px; }
    .tt-header__cross-link { padding: 5px 9px; font-size: 12px; }
}
