/*
Theme Name: Drone Night
Theme URI: https://example.com/drone-night
Author: Drone Company
Author URI: https://example.com
Description: 科技感黑色系无人机公司主题，专为夜间无人机表演设计。包含全屏视频Banner、YouTube视频展示、邮箱留资等功能。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drone-night
Tags: black, dark, tech, drone, one-column, custom-menu, featured-images, full-width-template, translation-ready
*/

/* ===== CSS Variables - 黑色科技感配色 ===== */
:root {
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #12121a;
  --color-bg-tertiary: #1a1a25;
  --color-accent: #00d4ff;
  --color-accent-dim: #0099bb;
  --color-accent-glow: rgba(0, 212, 255, 0.3);
  --color-text: #e8e8ec;
  --color-text-muted: #8a8a9a;
  --color-border: rgba(255, 255, 255, 0.08);
  --font-heading: 'Orbitron', 'Microsoft YaHei', sans-serif;
  --font-body: 'Exo 2', 'Microsoft YaHei', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg-primary);
  overflow-x: hidden;
}

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-dim); }
img { max-width: 100%; height: auto; display: block; }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 0.5em;
  letter-spacing: 0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--color-accent); }
h3 { font-size: 1.25rem; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition), padding var(--transition);
}
.site-header.scrolled {
  background: rgba(10, 10, 15, 0.98);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-logo img {
  max-height: 48px;
  width: auto;
}
.site-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.site-logo .logo-text span { color: var(--color-accent); }

/* Main Navigation */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 0;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a:hover { color: var(--color-accent); }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: var(--font-body);
}

/* ===== Video Banner ===== */
.video-banner {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-banner video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.video-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.4) 0%, rgba(10, 10, 15, 0.7) 50%, var(--color-bg-primary) 100%);
  pointer-events: none;
}
.video-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}
.video-banner-content h1 {
  color: #fff;
  text-shadow: 0 0 40px var(--color-accent-glow);
  margin-bottom: 0.5em;
}
.video-banner-content .tagline {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.video-banner-placeholder {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 50%, #0d1520 100%),
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  background-position: 0 0, 0 0, 0 0;
}

/* ===== Content Sections ===== */
.site-main { }
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 {
  margin-bottom: 0.5rem;
}
.section-title .subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* Text block */
.text-block {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}
.text-block p {
  margin: 0 0 1.5em;
}
.text-block p:last-child { margin-bottom: 0; }

/* ===== YouTube Videos Grid ===== */
.youtube-section {
  background: var(--color-bg-secondary);
  padding: 5rem 2rem;
}
.youtube-section .section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.video-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-tertiary);
  transition: transform var(--transition), box-shadow var(--transition);
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--color-accent-glow);
  border-color: var(--color-accent);
}
.video-card .embed-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-card .embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-card .video-caption {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ===== Email Signup ===== */
.email-signup-section {
  padding: 5rem 2rem;
  text-align: center;
}
.email-signup-section .section-inner {
  max-width: 600px;
  margin: 0 auto;
}
.email-signup-section h2 {
  margin-bottom: 0.5rem;
}
.email-signup-section .signup-desc {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}
.signup-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.signup-form input[type="email"] {
  flex: 1;
  min-width: 260px;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.signup-form input[type="email"]::placeholder {
  color: var(--color-text-muted);
}
.signup-form input[type="email"]:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.signup-form button {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-bg-primary);
  background: var(--color-accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.signup-form button:hover {
  background: var(--color-accent-dim);
  transform: scale(1.02);
}
.signup-form .message {
  width: 100%;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.signup-form .message.success { color: var(--color-accent); }
.signup-form .message.error { color: #ff6b6b; }

/* ===== Footer ===== */
.site-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: 4rem 2rem 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-widget h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}
.footer-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-widget li { margin-bottom: 0.5rem; }
.footer-widget a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.footer-widget a:hover { color: var(--color-accent); }
.footer-widget p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.footer-social {
  display: flex;
  gap: 1rem;
}
.footer-social a {
  color: var(--color-text-muted);
  font-size: 1.25rem;
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--color-accent); }

/* ===== Blog / Page / Single ===== */
.posts-list { display: flex; flex-direction: column; gap: 2rem; }
.post-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg-secondary);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  transition: border-color var(--transition);
}
.post-card:hover { border-color: var(--color-accent); }
.post-card .post-thumb { margin: 0; }
.post-card .post-thumb img { width: 100%; height: 200px; object-fit: cover; }
.post-card .post-content { padding: 1.5rem; }
.post-card .post-meta { color: var(--color-text-muted); font-size: 0.9rem; margin: 0 0 0.5em; }
.post-card .read-more { display: inline-block; margin-top: 0.5rem; }
.read-more { display: inline-block; padding: 0.75rem 1.5rem; border: 1px solid var(--color-accent); border-radius: 6px; color: var(--color-accent); font-weight: 500; transition: background var(--transition), color var(--transition); }
.read-more:hover { background: var(--color-accent); color: var(--color-bg-primary); }
.page-content .entry-content,
.single-content .entry-content { line-height: 1.8; color: var(--color-text-muted); }
.entry-content p { margin: 0 0 1em; }
.page-header { margin-bottom: 2rem; }
.entry-header { margin-bottom: 1.5rem; }
.single-content .post-thumb { margin-bottom: 1.5rem; border-radius: 8px; overflow: hidden; }
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  transition: border-color var(--transition), color var(--transition);
}
.pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination .current { border-color: var(--color-accent); color: var(--color-accent); }
@media (max-width: 768px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card .post-thumb img { height: 180px; }
}

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-nav { width: 100%; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .main-nav.active ul { max-height: 400px; }
  .main-nav li { border-bottom: 1px solid var(--color-border); }
  .main-nav a { display: block; padding: 1rem; }
  .nav-toggle { display: block; }
  .video-banner { min-height: 60vh; }
  .section, .youtube-section, .email-signup-section { padding: 3rem 1.5rem; }
  .signup-form { flex-direction: column; }
  .signup-form input[type="email"] { min-width: 100%; }
  .videos-grid { grid-template-columns: 1fr; }
}

/* ===== Page body padding for fixed header ===== */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
