/*
Theme Name: AI Video Theme Clean
Theme URI: https://example.com/
Author: VN Ken & ChatGPT
Author URI: https://example.com/
Description: Theme WordPress chuyên về video AI, không chứa gói dịch vụ / pricing, tập trung vào nội dung video & công cụ AI. Hỗ trợ hiển thị thời lượng video từ meta Veo.
Version: 1.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-video-theme-clean
*/

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --accent: #a855f7;
  --bg: #020617;
  --bg-alt: #050816;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --radius: 14px;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.13), transparent 60%),
    radial-gradient(circle at bottom, rgba(129, 140, 248, 0.16), transparent 60%),
    #020617;
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

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

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-main {
  padding-bottom: 40px;
}

/* Header */

.site-header {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.9);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar {
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.top-bar a {
  margin-left: 12px;
  color: var(--muted);
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.4),
              0 16px 40px rgba(16, 185, 129, 0.6);
}

.site-title {
  font-size: 20px;
  font-weight: 700;
}
.site-title a {
  color: #f9fafb;
}

.primary-nav {
  flex: 1;
  margin: 0 32px;
}
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.primary-nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
  position: relative;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 999px;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform-origin: center;
  transition: transform 0.16s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a {
  color: #f9fafb;
}
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after,
.primary-nav .current-menu-ancestor > a::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text);
}
.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.8);
}

/* Buttons */

.button,
button,
input[type=submit],
input[type=button],
input[type=reset] {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4),
              0 0 0 1px rgba(15, 23, 42, 0.85);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}
.button.small {
  padding: 5px 12px;
  font-size: 12px;
}
.button.outline {
  background: transparent;
  color: var(--text);
  box-shadow: none;
  border: 1px solid rgba(148, 163, 184, 0.6);
}
.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(79, 70, 229, 0.55),
              0 0 0 1px rgba(15, 23, 42, 0.9);
}
.button:active,
button:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.9);
}

/* Sections */

.section {
  padding: 40px 0;
}
.section + .section {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}
.section-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.section-subtitle {
  font-size: 13px;
  color: var(--muted);
}

/* Grid & Card */

.grid {
  display: grid;
  gap: 18px;
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.3);
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.95);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.98);
}
.card-inner {
  padding: 12px 14px 14px;
}
.card-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}
.card-title a {
  color: #f9fafb;
}
.card-title a:hover {
  color: #e0f2fe;
  text-decoration: none;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Video thumb */

.video-thumb {
  position: relative;
  overflow: hidden;
}
.video-thumb img {
  transform: scale(1.02);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.card:hover .video-thumb img {
  transform: scale(1.07);
  filter: saturate(1.15);
}
.video-time {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
}
.video-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--muted);
  display: inline-block;
  margin-bottom: 6px;
}

/* Hero */

.hero {
  padding: 42px 0 24px;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: center;
}
.hero-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.hero-badge {
  font-size: 12px;
  color: var(--muted);
}
.hero-video {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.4), transparent 55%),
              radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.5), transparent 55%);
  border-radius: 26px;
  padding: 3px;
}
.hero-video-inner {
  border-radius: 22px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.45);
}
.hero-meta {
  padding: 10px 14px 12px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* Archive layout */

.archive-layout {
  display: grid;
  gap: 24px;
}
@media (min-width: 960px) {
  .archive-layout {
    grid-template-columns: minmax(0, 3.2fr) minmax(0, 8.8fr);
  }
}
.archive-sidebar {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  padding: 14px 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.9);
  font-size: 13px;
  color: var(--muted);
}
.archive-sidebar h3 {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}
.archive-sidebar ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.archive-sidebar ul li {
  margin-bottom: 4px;
}
.archive-sidebar ul li a {
  color: var(--muted);
}
.archive-sidebar ul li a:hover {
  color: #e5e7eb;
}

/* Breadcrumb */

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: var(--text);
}

/* Pagination */

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}
.pagination .page-numbers {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
}
.pagination .current {
  border-color: rgba(148, 163, 184, 0.9);
}

/* Forms */

.form-control {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #020617;
  color: var(--text);
  font-size: 14px;
}
.form-group {
  margin-bottom: 12px;
}

/* Footer */

.site-footer {
  padding: 32px 0 16px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin-top: 40px;
}
.footer-top {
  display: grid;
  gap: 24px;
}
@media (min-width: 900px) {
  .footer-top {
    grid-template-columns: 2fr 1fr 1fr 2fr;
  }
}
.footer-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  color: var(--muted);
}
.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}
.footer-menu li {
  margin-bottom: 6px;
}
.footer-menu a {
  color: var(--muted);
}
.footer-menu a:hover {
  color: #e0f2fe;
}
.footer-newsletter input[type="email"] {
  width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 8px;
}
.footer-newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.8);
}
.footer-bottom {
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Dashboard */

.dashboard-layout {
  display: grid;
  gap: 24px;
}
@media (min-width: 960px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  }
}
.dashboard-sidebar {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 16px 14px;
  font-size: 14px;
}
.dashboard-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.dashboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}
.dashboard-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dashboard-menu li {
  margin-bottom: 4px;
}
.dashboard-menu a {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
}
.dashboard-menu a:hover,
.dashboard-menu .current {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(129, 140, 248, 0.45));
  color: #f9fafb;
}
.stats-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.stat-card {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.98);
  padding: 10px 12px 12px;
  font-size: 13px;
}
.stat-label {
  color: var(--muted);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 20px;
  font-weight: 600;
}

/* Auth */

.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 65%),
              rgba(15, 23, 42, 0.98);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 20px 18px 22px;
}
.auth-header {
  text-align: center;
  margin-bottom: 16px;
}
.auth-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}
.auth-sub {
  font-size: 13px;
  color: var(--muted);
}
.auth-divider {
  text-align: center;
  margin: 10px 0;
  font-size: 12px;
  color: var(--muted);
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(148, 163, 184, 0.3);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* 404 */

.hero-404 {
  text-align: center;
  padding: 60px 0;
}
.hero-404-title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
}
.hero-404-sub {
  font-size: 15px;
  color: var(--muted);
}

/* Single video */

.video-meta-bar {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.video-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.code-block {
  background: #020617;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  overflow: auto;
}

/* Responsive */

@media (max-width: 900px) {
  .primary-nav {
    display: none;
  }
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .section {
    padding: 28px 0;
  }
}
@media (max-width: 640px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .main-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}
