/*
Theme Name: V8 Fleet Theme
Theme URI: https://ksv8.me
Author: AK Media
Author URI: https://ksv8.me
Description: China V8 Fleet official website WordPress theme for Euro Truck Simulator 2 online fleet. Includes fleet history, DLC requirements, community, anniversary videos, team introduction. Supports dark/light theme switching, responsive design, music player.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: v8-fleet
Tags: custom-menu, custom-logo, featured-images, theme-options, translation-ready
*/

/* ===== CSS Variables ===== */
:root {
  --primary: #2ecc71;
  --primary-dark: #27ae60;
  --accent: #2ecc71;
  --bg: #090a14;
  --bg-alt: #0f1020;
  --card: #121428;
  --text: #f0f2f5;
  --text-dim: #9aa0b8;
  --border: rgba(255, 255, 255, 0.06);
  --green-glow: rgba(46, 204, 113, 0.3);
  --nav-bg: rgba(12, 14, 28, 0.72);
}

/* Light theme */
[data-theme="light"] {
  --primary: #27ae60;
  --primary-dark: #219a52;
  --accent: #27ae60;
  --bg: #f5f6fa;
  --bg-alt: #e8ecf2;
  --card: #ffffff;
  --text: #1a1d2e;
  --text-dim: #5a6070;
  --border: rgba(0, 0, 0, 0.08);
  --green-glow: rgba(39, 174, 96, 0.2);
  --nav-bg: rgba(255, 255, 255, 0.92);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 90%; max-width: 1120px; margin: 0 auto; }

/* Navigation */
.nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  transition: background 0.3s;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { width: 32px; height: 32px; margin-right: 8px; border-radius: 6px; flex-shrink: 0; }
.logo { display: flex; align-items: center; font-size: 1.2rem; font-weight: 700; color: var(--text); }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 0.95rem; color: var(--text-dim); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.theme-toggle, .menu-toggle {
  background: none; border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.9rem;
}
.menu-toggle { display: none; }

/* Enter overlay */
.enter-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(9, 10, 20, 0.98);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s;
}
.enter-overlay.hidden { opacity: 0; pointer-events: none; }
.enter-box { text-align: center; }
.enter-logo { width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 16px; }
.enter-box h1 { font-size: 2rem; margin-bottom: 10px; }
.enter-box h1 span { color: var(--primary); }
.enter-box p { color: var(--text-dim); margin-bottom: 30px; }
.enter-btn {
  background: var(--primary); color: #fff; border: none;
  padding: 12px 40px; border-radius: 8px; font-size: 1rem;
  cursor: pointer; transition: background 0.2s;
}
.enter-btn:hover { background: var(--primary-dark); }

/* Hero */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(9,10,20,0.85), rgba(9,10,20,0.6)),
              url('images/hero-banner.jpg') center/cover;
  display: flex; align-items: center;
  padding-top: 64px;
}
.hero-text h2 { font-size: 2.5rem; margin-bottom: 16px; }
.hero-text p { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 30px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 10px 24px; border-radius: 6px;
  font-size: 0.95rem; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--primary); color: #fff; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  text-align: center; font-size: 2rem; margin-bottom: 10px;
  color: var(--text);
}
.section-sub { text-align: center; color: var(--text-dim); margin-bottom: 40px; }

/* History */
.history-block { max-width: 800px; margin: 0 auto; text-align: center; }
.history-block p { color: var(--text); line-height: 1.9; margin-bottom: 16px; }
.history-slogan {
  color: var(--primary) !important;
  font-weight: 700;
  font-size: 18px;
  margin-top: 30px !important;
}

/* DLC */
.dlc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.dlc-card {
  background: var(--card); border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.dlc-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px var(--green-glow); }
.dlc-card img { width: 100%; height: 140px; object-fit: cover; }
.dlc-info { padding: 14px; }
.dlc-name { display: block; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.dlc-num { color: var(--primary); }
.dlc-eng { font-size: 0.85rem; color: var(--text-dim); }

/* Community */
.community-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.community-card {
  background: var(--card); border-radius: 12px; padding: 30px;
  border: 1px solid var(--border); text-align: center;
}
.group-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: #fff;
}
.community-card h3 { margin-bottom: 12px; color: var(--text); }
.community-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 20px; }
.yy-badge {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.yy-badge-icon {
  background: var(--primary); color: #fff; padding: 6px 12px;
  border-radius: 6px; font-weight: 700;
}
.yy-badge-text { color: var(--text); font-weight: 500; }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.video-card {
  background: var(--card); border-radius: 12px; padding: 24px;
  border: 1px solid var(--border);
}
.video-card h4 { margin-bottom: 10px; color: var(--text); }
.video-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 16px; }
.video-author { display: block; color: var(--text-dim); font-size: 0.85rem; margin-bottom: 12px; }

/* Team */
.team-grid {
  display: flex; gap: 24px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: thin; scrollbar-color: var(--primary) var(--card);
}
.team-grid::-webkit-scrollbar { height: 6px; }
.team-grid::-webkit-scrollbar-track { background: var(--card); }
.team-grid::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
.team-card {
  flex: 0 0 auto; text-align: center; min-width: 120px;
}
.team-card img {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 10px;
  border: 2px solid var(--primary);
}
.team-card h4 { color: var(--text); font-size: 0.95rem; }

/* Footer */
.footer { background: var(--bg-alt); padding: 60px 0 20px; border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: var(--primary); margin-bottom: 16px; }
.footer-col p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 8px; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; margin-right: 12px; }
.footer-links a:hover { color: var(--primary); }
.footer-links .sep { color: var(--border); margin: 0 8px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--border); }
.footer-bottom p { color: var(--text-dim); font-size: 0.85rem; }
.footer-nav { margin-top: 10px; }
.footer-nav a { color: var(--text-dim); font-size: 0.85rem; margin: 0 10px; }

/* Music Player */
.music-player {
  position: fixed; bottom: 20px; right: 20px; z-index: 150;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  width: 60px; height: 60px; overflow: hidden;
  transition: all 0.3s;
}
.music-player.open { width: 320px; height: auto; padding: 16px; }
.music-toggle {
  width: 60px; height: 60px; background: var(--primary); color: #fff;
  border: none; border-radius: 12px; font-size: 1.5rem; cursor: pointer;
}
.music-panel { display: none; }
.music-player.open .music-panel { display: block; }
.music-player.open .music-toggle { display: none; }
.music-info { margin-bottom: 12px; }
.music-title { display: block; font-weight: 600; color: var(--text); }
.music-artist { color: var(--text-dim); font-size: 0.85rem; }
.music-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.music-progress input[type="range"] { flex: 1; }
.music-progress span { color: var(--text-dim); font-size: 0.8rem; min-width: 36px; }
.music-controls { display: flex; justify-content: center; gap: 16px; }
.music-controls button {
  background: var(--primary); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font-size: 1rem;
}

/* Forms */
.contact-form { max-width: 500px; margin: 0 auto 40px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 0.95rem;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-tip { text-align: center; color: var(--text-dim); margin-top: 10px; }
.info-list { max-width: 500px; margin: 0 auto; }
.info-list div { color: var(--text-dim); margin-bottom: 10px; }

/* About */
.about-text { max-width: 700px; margin: 0 auto; }
.about-text p { color: var(--text); margin-bottom: 16px; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); flex-direction: column; padding: 20px; gap: 16px; }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .hero-text h2 { font-size: 1.8rem; }
  .section { padding: 50px 0; }
  .section-title { font-size: 1.5rem; }
  .dlc-grid, .video-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
