 :root {
  --bg: #0f0f0f;
  --surface: #181818;
  --surface-hover: #222222;
  --text: #ffffff;
  --text-muted: #a1a1aa;
  --accent: #a855f7;
  --accent-hover: #9333ea;
  --border: #292929;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: "Inter", sans-serif; line-height: 1.5; min-height: 100vh; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.accent { color: var(--accent); }

.header {
  height: 76px; padding: 0 5%; display: flex; align-items: center;
  justify-content: space-between; gap: 30px; background: rgba(15,15,15,.95);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(15px);
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; white-space: nowrap; }
.logo-icon { display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 10px; background: var(--accent); font-size: 16px; color: white; box-shadow: 0 0 20px rgba(168,85,247,.3); }
.search-container { display: flex; align-items: center; max-width: 520px; width: 100%; height: 44px; background: #1a1a1a; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color .3s; }
.search-container:focus-within { border-color: var(--accent); }
.search-container input { width: 100%; height: 100%; background: transparent; border: none; outline: none; color: white; padding: 0 16px; }
.search-container input::placeholder { color: #777; }
.search-btn { height: 100%; width: 50px; background: transparent; color: white; border: none; font-size: 25px; transition: background .3s; }
.search-btn:hover { background: #292929; }
.login-btn { padding: 11px 25px; border-radius: 10px; border: 1px solid var(--accent); background: transparent; color: white; font-weight: 600; transition: all .3s ease; white-space: nowrap; }
.login-btn:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 5px 20px rgba(168,85,247,.25); }

.hero {
  position: relative; min-height: 480px; margin: 30px 5%; border-radius: 24px; overflow: hidden;
  background: url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=1920&q=85") center 45% / cover no-repeat;
  display: flex; align-items: center;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,10,.95) 0%, rgba(10,10,10,.75) 45%, rgba(10,10,10,.1) 100%); }
.hero-content { position: relative; z-index: 1; max-width: 650px; padding: 60px; animation: fadeUp .8s ease; }
.hero-tag, .section-label { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 3px; }
.hero h1 { font-size: clamp(40px, 5vw, 70px); line-height: 1.1; margin: 20px 0; font-weight: 800; }
.hero p { max-width: 450px; color: #c4c4c4; font-size: 16px; margin-bottom: 30px; }
.primary-btn { display: inline-flex; justify-content: center; align-items: center; gap: 15px; padding: 15px 28px; background: var(--accent); border: none; border-radius: 12px; color: white; font-weight: 700; transition: all .3s ease; }
.primary-btn:hover { background: var(--accent-hover); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(168,85,247,.3); }
.hero-badge { position: absolute; bottom: 25px; right: 25px; z-index: 1; background: rgba(15,15,15,.7); backdrop-filter: blur(10px); padding: 10px 15px; border-radius: 30px; font-size: 12px; color: #ddd; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #a855f7; box-shadow: 0 0 10px #a855f7; }

.videos-section { padding: 40px 5% 80px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.section-header h2 { font-size: 30px; margin-top: 8px; }
.view-all { color: var(--accent); font-weight: 600; transition: opacity .3s; }
.view-all:hover { opacity: .7; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 22px; }
.video-card { min-width: 0; cursor: pointer; transition: transform .3s ease; }
.video-card:hover { transform: scale(1.03); }
.thumbnail { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: #222; }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.video-card:hover .thumbnail img { transform: scale(1.08); }
.duration { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.85); padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.video-info { display: flex; gap: 12px; margin-top: 15px; align-items: flex-start; }
.avatar { flex-shrink: 0; width: 38px; height: 38px; display: flex; justify-content: center; align-items: center; border-radius: 50%; background: #7c3aed; font-weight: 700; }
.avatar-purple { background: #6d28d9; } .avatar-pink { background: #be185d; } .avatar-blue { background: #2563eb; } .avatar-green { background: #15803d; } .avatar-orange { background: #c2410c; }
.video-details { flex: 1; min-width: 0; }
.video-details h3 { font-size: 15px; line-height: 1.5; margin-bottom: 6px; font-weight: 600; }
.video-details p { font-size: 13px; color: #d4d4d4; margin-bottom: 3px; }
.video-details span { font-size: 12px; color: var(--text-muted); }
.more-btn { background: transparent; color: #aaa; border: none; font-size: 22px; padding: 0 5px; transition: color .3s; }
.more-btn:hover { color: white; }
.empty-message { display: none; text-align: center; padding: 50px 10px; color: var(--text-muted); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s ease, visibility .3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
.modal { position: relative; width: 100%; max-width: 430px; padding: 40px; background: #181818; border: 1px solid #333; border-radius: 22px; transform: translateY(25px) scale(.97); transition: transform .3s ease; max-height: 90vh; overflow-y: auto; }
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.close-modal { position: absolute; top: 15px; right: 18px; width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: transparent; color: #aaa; font-size: 28px; transition: background .3s, color .3s; }
.close-modal:hover { background: #333; color: white; }
.modal-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.modal h2 { text-align: center; font-size: 26px; }
.modal-subtitle { text-align: center; color: var(--text-muted); margin: 10px 0 30px; font-size: 14px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.form-group input { width: 100%; height: 50px; padding: 0 15px; background: #101010; border: 1px solid #333; border-radius: 10px; color: white; outline: none; transition: border-color .3s, box-shadow .3s; }
.form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168,85,247,.1); }
.form-group input::placeholder { color: #666; }
.form-group input.invalid { border-color: #ef4444; }
.form-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; font-size: 12px; }
.remember-label { display: flex; align-items: center; gap: 7px; color: #aaa; cursor: pointer; }
.remember-label input { accent-color: var(--accent); }
.form-options a, .register-link a { color: var(--accent); transition: opacity .3s; }
.form-options a:hover, .register-link a:hover { opacity: .7; }
.form-message { min-height: 20px; margin-bottom: 10px; font-size: 13px; color: #f87171; }
.form-message.success { color: #4ade80; }
.submit-btn { width: 100%; }
.register-link { text-align: center; margin-top: 25px; color: #aaa; font-size: 13px; }

.footer { padding: 25px 5%; border-top: 1px solid var(--border); text-align: center; color: #666; font-size: 13px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero { min-height: 420px; } }
@media (max-width: 700px) {
  .header { height: 65px; padding: 0 20px; gap: 12px; }
  .logo { font-size: 18px; } .logo-icon { width: 30px; height: 30px; }
  .search-container { max-width: 180px; } .search-container input { padding: 0 10px; font-size: 13px; }
  .login-btn { padding: 9px 14px; font-size: 13px; }
  .hero { margin: 20px; min-height: 400px; border-radius: 18px; }
  .hero-content { padding: 30px; } .hero h1 { font-size: 44px; } .hero p { font-size: 14px; } .hero-badge { display: none; }
  .videos-section { padding: 30px 20px 60px; } .section-header h2 { font-size: 24px; }
  .video-grid { grid-template-columns: 1fr; gap: 25px; } .video-card:hover { transform: scale(1.01); }
  .modal { padding: 35px 25px; }
}
@media (max-width: 420px) {
  .header { gap: 8px; } .logo { font-size: 16px; gap: 6px; }
  .search-container { max-width: 42px; border: none; background: transparent; }
  .search-container input { width: 0; padding: 0; opacity: 0; transition: all .3s; }
  .search-container:focus-within { position: absolute; left: 20px; right: 20px; max-width: none; background: #1a1a1a; border: 1px solid var(--accent); z-index: 10; }
  .search-container:focus-within input { width: 100%; padding: 0 12px; opacity: 1; }
  .search-btn { flex-shrink: 0; } .login-btn { padding: 8px 12px; }
  .hero h1 { font-size: 36px; } .hero-content { padding: 25px; }
  .section-header { align-items: flex-start; gap: 10px; } .view-all { font-size: 12px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
