/* LuboTube — Video Platform Styles */
:root {
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-input: #222;
  --text: #f1f1f1;
  --text-muted: #aaa;
  --primary: #e63946;
  --primary-hover: #d62839;
  --accent: #ffd60a;
  --border: #333;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.4);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; width: 100%; }

/* Header */
.site-header {
  background: #181818;
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 2rem; }
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); font-size: 1.4rem; }
.logo-icon { color: var(--primary); font-size: 1.6rem; }
.logo-text strong { color: var(--primary); }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color .2s; }
.main-nav a:hover { color: var(--text); }
.user-nav { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.user-greeting { color: var(--text-muted); font-size: .9rem; }

/* Buttons */
.btn {
  display: inline-block; padding: .5rem 1rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 500; border: 1px solid var(--border);
  color: var(--text); background: transparent; cursor: pointer; font-size: .9rem;
  transition: all .2s;
}
.btn:hover { background: var(--bg-card); border-color: var(--text-muted); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn-sm { padding: .3rem .7rem; font-size: .85rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Main content */
.main-content { flex: 1; padding: 2rem 1rem; }

/* Hero */
.hero { text-align: center; padding: 3rem 0; }
.hero h1 { font-size: 2.5rem; margin-bottom: .5rem; }
.hero-subtitle { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Video Grid */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.video-card { text-decoration: none; color: var(--text); background: var(--bg-card); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #222; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; color: var(--text-muted); }
.duration { position: absolute; bottom: .5rem; right: .5rem; background: rgba(0,0,0,.8); padding: .15rem .4rem; border-radius: 3px; font-size: .8rem; }
.video-info { padding: .75rem; }
.video-info h3 { font-size: 1rem; margin-bottom: .3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { color: var(--text-muted); font-size: .85rem; }

/* Section */
.section { margin: 2rem 0; }
.section h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }

/* Watch page */
.watch-page { max-width: 960px; margin: 0 auto; }
.player-wrapper { aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.player-wrapper video { width: 100%; height: 100%; }
.processing-msg { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); }
.video-details h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.video-stats { color: var(--text-muted); font-size: .9rem; margin-bottom: .75rem; display: flex; gap: .5rem; align-items: center; }
.category-badge { background: var(--primary); color: #fff; padding: .1rem .5rem; border-radius: 3px; font-size: .8rem; }
.video-description { margin: 1rem 0; padding: 1rem; background: var(--bg-card); border-radius: var(--radius); }
.video-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.tag { color: var(--accent); font-size: .85rem; }

/* Comments */
.comments-section { margin-top: 2rem; }
.comment-form { margin: 1rem 0; }
.comment-form textarea { width: 100%; padding: .75rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: inherit; resize: vertical; }
.comment-form button { margin-top: .5rem; }
.comments-list { margin-top: 1rem; }
.comment { padding: 1rem; border-bottom: 1px solid var(--border); }
.comment-header { display: flex; gap: .75rem; align-items: baseline; margin-bottom: .3rem; }
.comment-date { color: var(--text-muted); font-size: .8rem; }

/* Auth */
.auth-page { max-width: 420px; margin: 2rem auto; }
.auth-form { margin-top: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .3rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .6rem .75rem; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
  font-size: 1rem; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); outline: none; }
.auth-switch { margin-top: 1rem; text-align: center; color: var(--text-muted); }
.auth-switch a { color: var(--primary); }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-error { background: rgba(230,57,70,.15); border: 1px solid var(--primary); color: #ff6b6b; }

/* Membership */
.membership-promo { text-align: center; }
.membership-box { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 400px; margin: 0 auto; }
.membership-box.featured { border-color: var(--primary); }
.membership-box h2, .membership-box h3 { color: var(--accent); font-size: 2rem; margin-bottom: 1rem; }
.membership-box ul { list-style: none; text-align: left; margin-bottom: 1.5rem; }
.membership-box li { padding: .4rem 0; color: var(--text-muted); }
.membership-box li::before { content: "✓ "; color: var(--primary); font-weight: bold; }
.membership-info { color: var(--text-muted); }
.membership-note { color: var(--text-muted); font-size: .9rem; margin-top: 1rem; }

/* Admin */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius); text-align: center; border: 1px solid var(--border); }
.stat-card h3 { font-size: 2rem; color: var(--accent); }
.admin-table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.admin-table th, .admin-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--text-muted); font-weight: 500; }
.badge { padding: .15rem .5rem; border-radius: 3px; font-size: .8rem; }
.badge-ready { background: #27ae60; color: #fff; }
.badge-processing { background: #f39c12; color: #fff; }
.badge-error { background: #c0392b; color: #fff; }

/* Upload */
.upload-page { max-width: 600px; margin: 0 auto; }
.upload-form { margin-top: 1rem; }

/* Footer */
.site-footer { text-align: center; padding: 1.5rem; color: var(--text-muted); font-size: .85rem; border-top: 1px solid var(--border); margin-top: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 1rem; }
  .main-nav { gap: 1rem; }
  .user-nav { width: 100%; justify-content: flex-end; }
  .hero h1 { font-size: 1.8rem; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
