/* ═══════════════════════════════════════════════════════════════
   KidTube — Dark Cyberpunk Glassmorphism
   YouTube-inspired, parental-curated video platform
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Variables ──────────────────────────────────────── */

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

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-elevated: #222222;
    --bg-glass: rgba(30, 30, 30, 0.65);
    --bg-glass-hover: rgba(45, 45, 45, 0.75);

    --text-primary: #f1f1f1;
    --text-secondary: #aaaaaa;
    --text-muted: #717171;

    --accent: #ff0033;
    --accent-glow: rgba(255, 0, 51, 0.3);
    --accent-hover: #ff1a4a;
    --accent-soft: rgba(255, 0, 51, 0.1);

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);

    --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --nav-height: 64px;
    --sidebar-width: 400px;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    background: none;
}

input, select, textarea {
    font-family: var(--font-body);
}

code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
}


/* ─── Ambient Background ─────────────────────────────────────── */

.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    left: -100px;
    animation: orbFloat1 25s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #3b82f6;
    bottom: -200px;
    right: -100px;
    animation: orbFloat2 30s ease-in-out infinite;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: #a855f7;
    top: 40%;
    left: 50%;
    animation: orbFloat3 20s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(60px, 40px); }
}
@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, -60px); }
}
@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}


/* ─── Navigation ─────────────────────────────────────────────── */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-inner {
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.logo-badge {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    margin-top: 1px;
}

.nav-search {
    flex: 1;
    max-width: 640px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    height: 40px;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    padding: 0 16px 0 42px;
    color: var(--text-primary);
    font-size: 0.93rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.search-input:focus {
    border-color: var(--border-strong);
    background: var(--bg-elevated);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    height: 100%;
    padding: 0 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    color: var(--text-secondary);
    font-size: 0.87rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: rgba(255,255,255,0.1);
}

.nav-actions {
    flex-shrink: 0;
}

.channel-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    max-width: 180px;
}


/* ─── Main Content ───────────────────────────────────────────── */

.main-content {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}


/* ─── Home / Video Grid ──────────────────────────────────────── */

.home-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px 20px;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.search-results-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
}

.clear-search, .clear-filter {
    font-size: 0.85rem;
    color: var(--accent);
    transition: opacity 0.2s;
}

.clear-search:hover, .clear-filter:hover {
    opacity: 0.8;
}

.channel-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
}

.channel-banner-thumb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-banner-info h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

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

.video-card {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: cardFadeIn 0.4s ease both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.video-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.video-card:hover .video-thumb {
    transform: scale(1.05);
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: rgba(0,0,0,0.2);
}

.video-card:hover .thumb-overlay {
    opacity: 1;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    z-index: 2;
}

.video-duration.small {
    font-size: 0.7rem;
    padding: 1px 5px;
}

.video-info {
    display: flex;
    gap: 12px;
    padding: 12px 4px 8px;
}

.video-channel-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    margin-top: 2px;
}

.video-meta {
    flex: 1;
    min-width: 0;
    margin-left: 0;
}

.video-title {
    font-size: 0.93rem;
    font-weight: 500;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.video-channel-name {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    transition: color 0.2s;
}

.video-card:hover .video-channel-name {
    color: var(--text-primary);
}

.video-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dot {
    margin: 0 4px;
}


/* ─── Watch Page ─────────────────────────────────────────────── */

.watch-container {
    display: flex;
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.watch-main {
    flex: 1;
    min-width: 0;
}

.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
}

.player-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.watch-info {
    padding: 20px 0;
}

.watch-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 14px;
}

.watch-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.watch-channel-link {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.2s;
}

.watch-channel-link:hover {
    opacity: 0.85;
}

.watch-channel-thumb {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.watch-channel-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.watch-stats {
    font-size: 0.87rem;
    color: var(--text-secondary);
}

.watch-description {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Sidebar */
.watch-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-card {
    display: flex;
    gap: 10px;
    padding: 6px;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.related-card:hover {
    background: var(--bg-glass-hover);
}

.related-thumb-wrap {
    position: relative;
    width: 168px;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
}

.related-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.related-title {
    font-size: 0.83rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.related-channel {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.related-stats {
    font-size: 0.74rem;
    color: var(--text-muted);
}


/* ─── Channel Page ───────────────────────────────────────────── */

.channel-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px 20px;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    margin-bottom: 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(16px);
}

.channel-header-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-strong);
}

.channel-header-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.channel-subs {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.channel-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}


/* ─── Pagination ─────────────────────────────────────────────── */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-btn {
    padding: 8px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.87rem;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s;
    backdrop-filter: blur(8px);
}

.page-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-strong);
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}


/* ─── Empty State ────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-icon {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
}


/* ─── 404 Error Page ─────────────────────────────────────────── */

.error-page {
    text-align: center;
    padding: 120px 20px;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 16px;
}

.error-page h2 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 24px;
}


/* ─── Flash Messages ─────────────────────────────────────────── */

.flash-container {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 420px;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.87rem;
    backdrop-filter: blur(12px);
    border: 1px solid;
    animation: flashSlide 0.3s ease;
}

@keyframes flashSlide {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.flash-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.flash-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.flash-warning {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.3);
    color: #fbbf24;
}

.flash-close {
    font-size: 1.2rem;
    color: inherit;
    opacity: 0.6;
    padding: 0 4px;
    cursor: pointer;
}

.flash-close:hover {
    opacity: 1;
}


/* ─── Login Page ─────────────────────────────────────────────── */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-elevated);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.87rem;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.login-back:hover {
    color: var(--text-primary);
}


/* ─── Admin Dashboard ────────────────────────────────────────── */

.admin-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.admin-header {
    margin-bottom: 28px;
}

.admin-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
}

.admin-nav-actions {
    display: flex;
    gap: 8px;
}

/* Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    backdrop-filter: blur(12px);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-good .stat-value { color: #4ade80; }
.stat-warn .stat-value { color: #fbbf24; }

/* Alert */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.alert a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alert-warn {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.25);
    color: #fbbf24;
}

/* Sections */
.admin-section {
    margin-bottom: 36px;
}

.admin-section h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-header h2 {
    margin-bottom: 0;
}

/* Add channel form */
.add-channel-form {
    margin-bottom: 8px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.5;
}

/* Channel list */
.channel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-channel-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
}

.admin-channel-card:hover {
    border-color: var(--border-strong);
}

.channel-inactive {
    opacity: 0.5;
}

.channel-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.admin-channel-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.channel-card-info h3 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.channel-card-id {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-inactive {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
}

.channel-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}


/* ─── Form Components ────────────────────────────────────────── */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.form-input {
    height: 42px;
    padding: 0 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.form-input:focus {
    border-color: var(--accent);
    background: var(--bg-elevated);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input-lg {
    height: 48px;
    font-size: 0.95rem;
    padding: 0 18px;
    flex: 1;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}


/* ─── Buttons ────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-danger {
    background: transparent;
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

.btn-sm {
    height: 34px;
    padding: 0 14px;
    font-size: 0.82rem;
}

.btn-full {
    width: 100%;
}


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

@media (max-width: 1024px) {
    .watch-container {
        flex-direction: column;
    }

    .watch-sidebar {
        width: 100%;
    }

    .related-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .related-card {
        flex-direction: column;
    }

    .related-thumb-wrap {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-inner {
        padding: 0 12px;
        gap: 10px;
    }

    .logo-text {
        display: none;
    }

    .nav-search {
        max-width: none;
    }

    .channel-select {
        max-width: 120px;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }

    .home-container {
        padding: 16px 12px;
    }

    .watch-container {
        padding: 12px;
    }

    .watch-title {
        font-size: 1.1rem;
    }

    .admin-container {
        padding: 16px 12px 40px;
    }

    .input-group {
        flex-direction: column;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .admin-channel-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .channel-card-actions {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }

    .search-btn {
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .related-list {
        grid-template-columns: 1fr;
    }
}
