/*
Theme Name: The Video Museum
Theme URI: https://videomuseum.com
Author: AI Developer
Description: 90s Nostalgia Archive with Usluer.net aesthetic
Version: 1.0
License: GPL v2
Text Domain: video-museum
*/

:root {
    --bg-primary: #fafaf9;
    --bg-secondary: #f5f5f4;
    --bg-card: #ffffff;
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #a8a29e;
    --accent: #14b8a6;
    --accent-hover: #0d9488;
    --accent-light: #ccfbf1;
    --border: #e7e5e4;
    --gold: #fbbf24;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

.icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    background: var(--bg-secondary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
}

.nav-main {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-main::-webkit-scrollbar { display: none; }

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 2rem;
}

.nav-item {
    padding: 1rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-item:hover, .nav-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-sub {
    background: white;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.75rem 0;
}

.nav-sub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.nav-sub-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-sub-item:hover { color: var(--text-primary); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

@media (max-width: 968px) {
    .container { grid-template-columns: 1fr; gap: 2rem; }
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.video-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: #d6d3d1;
}

@media (max-width: 640px) {
    .video-card { flex-direction: column; padding: 1rem; }
}

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

@media (max-width: 640px) {
    .thumbnail-wrap { width: 100%; }
}

.thumbnail-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: ui-monospace, monospace;
    font-weight: 600;
}

.video-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.video-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-title:hover { color: var(--accent); }

.ai-description {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.tag:not(:last-child)::after {
    content: "•";
    margin-left: 0.5rem;
    color: var(--border);
}

.meta-row {
    display: flex;
    gap: 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
    font-weight: 500;
}

.sidebar { display: flex; flex-direction: column; gap: 2rem; }

.widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud a {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
    font-weight: 500;
}

.tag-cloud a:hover {
    background: var(--accent);
    color: white;
}

.comments-section {
    margin-top: 3rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.comment-form {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
}

.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    font-size: 1rem;
}

.form-textarea:focus { outline: none; border-color: var(--accent); }

.form-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.comment {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
}

.comment.best {
    border-left-color: var(--gold);
    background: #fffbeb;
    position: relative;
}

.comment.best::before {
    content: "Museum Quality";
    position: absolute;
    top: -10px;
    right: 1rem;
    background: var(--gold);
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    align-items: center;
}

.comment-author {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-weight: 600;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.comment-time { color: var(--text-muted); font-size: 0.9rem; }

.comment-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.vote-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-weight: 500;
}

.vote-btn:hover { border-color: var(--accent); color: var(--accent); }

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

.reply-btn {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: none;
    border: none;
}

.nested {
    margin-left: 2rem;
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}

@media (max-width: 640px) {
    .nested { margin-left: 1rem; padding-left: 0.5rem; }
}

.video-player {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.action-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-secondary);
}

.action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--accent);
}

.action-btn.clap {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.action-btn.clap.active { background: var(--accent); color: white; border-color: var(--accent); }

.ai-box {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 2rem;
    font-style: italic;
    color: #0f766e;
    line-height: 1.7;
}

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 3rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .footer-content { grid-template-columns: repeat(2, 1fr); }
}

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

.footer-col h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .search-box { display: none; }
    .btn-primary span { display: none; }
}

.tvm-meta-box { padding: 1rem; }
.tvm-meta-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.tvm-meta-box input, .tvm-meta-box textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}