/* Dragon Ball FFXI - Ultimate Animated Crystal Theme */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Outfit:wght@300;400;600;800&family=Righteous&display=swap');

:root {
  --bg-base: #060814;
  --bg-surface: rgba(14, 18, 42, 0.65);
  
  --primary-gold: #FFD700;
  --primary-gold-glow: rgba(255, 215, 0, 0.6);
  --primary-cyan: #00F0FF;
  --primary-cyan-glow: rgba(0, 240, 255, 0.7);
  --primary-magenta: #FF007F;
  
  --text-main: #F0F4F8;
  --text-muted: #A0ABC0;
  
  --font-epic: 'Cinzel', serif;
  --font-modern: 'Outfit', sans-serif;
  --font-magic: 'Righteous', cursive;

  --glass-border: 1px solid rgba(0, 240, 255, 0.3);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 110%; scroll-behavior: smooth; }

body {
  font-family: var(--font-modern);
  background-color: var(--bg-base);
  color: var(--text-main);
  overflow-x: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body.page-home { background-image: linear-gradient(to bottom, rgba(6, 8, 20, 0.7), rgba(6, 8, 20, 0.95)), url('assets/bg_home.jpg'); }
body.page-setup { background-image: linear-gradient(to bottom, rgba(6, 8, 20, 0.7), rgba(6, 8, 20, 0.95)), url('assets/bg_setup.jpg'); }
body.page-rules { background-image: linear-gradient(to bottom, rgba(6, 8, 20, 0.7), rgba(6, 8, 20, 0.95)), url('assets/bg_rules.jpg'); }
body.page-commands { background-image: linear-gradient(to bottom, rgba(6, 8, 20, 0.7), rgba(6, 8, 20, 0.95)), url('assets/bg_commands.jpg'); }
body:not([class*="page-"]) { background-image: linear-gradient(to bottom, rgba(6, 8, 20, 0.7), rgba(6, 8, 20, 0.95)), url('assets/ffxi_dbz_bg.jpg'); }

/* Background animated elements */
.bg-orbs {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: -1; overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5;
  animation: floatOrb 20s infinite alternate ease-in-out;
}
.orb-1 { width: 400px; height: 400px; background: #0044ff; top: -100px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: #9900ff; bottom: -200px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #00f0ff; top: 40%; left: 60%; animation-delay: -10s; }

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, 100px) scale(1.2); }
}

/* Text & Typography */
h1, h2, h3, h4 { font-family: var(--font-epic); text-transform: uppercase; letter-spacing: 2px; }

/* Navbar */
.navbar {
  position: fixed; top: 0; width: 100%; padding: 20px 5%;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000; transition: all 0.4s;
  background: transparent;
}
.navbar.scrolled {
  background: rgba(6, 8, 20, 0.85); backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding: 15px 5%; box-shadow: 0 4px 30px rgba(0, 240, 255, 0.2);
}

.logo {
  font-family: var(--font-magic); font-size: 2.5rem;
  background: linear-gradient(to right, var(--primary-gold), #fff);
  -webkit-background-clip: text; color: transparent;
  text-decoration: none; text-shadow: 0 0 20px var(--primary-gold-glow);
  animation: pulseLogo 3s infinite;
}
@keyframes pulseLogo {
  0%, 100% { filter: drop-shadow(0 0 5px var(--primary-gold)); }
  50% { filter: drop-shadow(0 0 20px var(--primary-gold)); }
}

.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a {
  color: var(--text-main); text-decoration: none; font-weight: 600;
  font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px;
  transition: 0.3s; position: relative; padding: 5px 0;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px;
  background: var(--primary-cyan); transition: 0.3s; box-shadow: 0 0 10px var(--primary-cyan);
}
.nav-links a:hover { color: var(--primary-cyan); text-shadow: 0 0 15px var(--primary-cyan-glow); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--primary-cyan); text-shadow: 0 0 10px var(--primary-cyan-glow); }

.server-status {
  background: rgba(0, 240, 255, 0.1); border: 1px solid var(--primary-cyan);
  padding: 8px 20px; border-radius: 50px; font-weight: bold; color: var(--primary-cyan);
  box-shadow: 0 0 15px var(--primary-cyan-glow); display: flex; align-items: center;
  gap: 10px; animation: breathe 4s infinite alternate;
}
@keyframes breathe {
  0% { box-shadow: 0 0 10px var(--primary-cyan-glow); }
  100% { box-shadow: 0 0 25px var(--primary-cyan-glow); border-color: #fff; }
}
.server-status .dot {
  width: 12px; height: 12px; background: #00ff00; border-radius: 50%;
  box-shadow: 0 0 10px #00ff00; animation: flash 2s infinite;
}
@keyframes flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Hero Section */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; position: relative; padding-top: 100px;
  overflow: hidden;
}
#fireworks-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.7; }
.hero-content { z-index: 2; position: relative; max-width: 900px; }

.hero h1 {
  font-size: 6rem; font-weight: 900; margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-cyan) 100%);
  -webkit-background-clip: text; color: transparent;
  filter: drop-shadow(0 0 20px rgba(0,240,255,0.8));
  animation: slideDown 1s ease-out, float 6s infinite ease-in-out;
}
.hero-subtitle {
  font-size: 2.2rem; color: var(--primary-gold); margin-bottom: 20px;
  text-shadow: 0 0 15px var(--primary-gold-glow); font-family: var(--font-magic);
  animation: fadeIn 1.5s ease-out 0.5s both;
}
.hero p {
  font-size: 1.3rem; color: var(--text-muted); margin-bottom: 40px; line-height: 1.8;
  animation: fadeIn 1.5s ease-out 1s both;
}

/* Buttons */
.btn-primary {
  display: inline-block; padding: 18px 45px; font-size: 1.4rem; font-weight: 800;
  color: #060814; background: linear-gradient(45deg, var(--primary-cyan), #fff);
  text-decoration: none; border-radius: 50px; text-transform: uppercase;
  letter-spacing: 2px; transition: 0.3s; font-family: var(--font-epic);
  box-shadow: 0 0 30px var(--primary-cyan-glow);
  position: relative; overflow: hidden; border: none;
}
.btn-primary::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  transform: skewX(-20deg); transition: 0.5s;
}
.btn-primary:hover {
  transform: translateY(-5px) scale(1.05); box-shadow: 0 15px 40px var(--primary-cyan);
}
.btn-primary:hover::before { left: 150%; transition: 0.7s; }

/* Community Invite Section */
.community-invite-section {
  margin-top: 60px;
  background: rgba(0, 0, 0, 0.5);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
  animation: fadeIn 1.5s ease-out 1.5s both, breathe 4s infinite alternate;
}
.community-invite-title {
  color: var(--primary-gold);
  font-size: 1.8rem;
  margin-bottom: 25px;
  text-shadow: 0 0 15px var(--primary-gold-glow);
  letter-spacing: 2px;
}
.hero-social-links { display: flex; gap: 25px; justify-content: center; flex-wrap: wrap; }

.social-btn {
  padding: 15px 35px; border-radius: 50px; background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.2); color: var(--text-main);
  text-decoration: none; font-weight: 900; font-size: 1.3rem; transition: 0.3s; 
  backdrop-filter: blur(10px); display: flex; align-items: center; gap: 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5); text-transform: uppercase;
}
.social-icon { font-size: 1.8rem; }
.social-btn:hover { transform: translateY(-8px) scale(1.05); }

/* Specific glowing styles */
.discord-btn { border-color: rgba(88, 101, 242, 0.5); }
.discord-btn:hover { background: #5865F2; color: #fff; box-shadow: 0 15px 30px rgba(88, 101, 242, 0.8); border-color: #5865F2; }

.youtube-btn { border-color: rgba(255, 0, 0, 0.5); }
.youtube-btn:hover { background: #FF0000; color: #fff; box-shadow: 0 15px 30px rgba(255, 0, 0, 0.8); border-color: #FF0000; }

.twitch-btn { border-color: rgba(145, 70, 255, 0.5); }
.twitch-btn:hover { background: #9146FF; color: #fff; box-shadow: 0 15px 30px rgba(145, 70, 255, 0.8); border-color: #9146FF; }

/* Sections */
.section-container { max-width: 1300px; margin: 0 auto; padding: 100px 20px; position: relative; z-index: 2; }
.section-title {
  text-align: center; font-size: 3.5rem; color: #fff; margin-bottom: 60px;
  text-shadow: 0 0 20px var(--primary-cyan-glow); position: relative;
  display: block; width: 100%;
}
.section-title::after {
  content: ''; position: absolute; bottom: -10px; left: 20%; width: 60%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent);
}

/* Tabs - Game Menu Style */
.tabs-container {
  display: flex; background: var(--bg-surface); backdrop-filter: blur(20px);
  border-radius: 20px; border: var(--glass-border); box-shadow: var(--glass-shadow);
  overflow: hidden; min-height: 550px;
}
.tabs-menu {
  flex: 0 0 320px; background: rgba(0,0,0,0.5); border-right: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column; padding: 20px 0;
}
.tab-btn {
  background: transparent; border: none; padding: 20px 30px; color: var(--text-muted);
  font-family: var(--font-epic); font-size: 1.2rem; text-align: left; cursor: pointer;
  transition: 0.3s; position: relative; font-weight: bold; overflow: hidden;
}
.tab-btn::before {
  content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 4px;
  background: var(--primary-cyan); transform: scaleY(0); transition: 0.3s;
}
.tab-btn:hover { color: #fff; background: rgba(0, 240, 255, 0.05); padding-left: 40px; }
.tab-btn.active {
  color: var(--primary-cyan); background: linear-gradient(90deg, rgba(0, 240, 255, 0.15), transparent);
  text-shadow: 0 0 10px var(--primary-cyan-glow); padding-left: 40px;
}
.tab-btn.active::before { transform: scaleY(1); }

.tabs-content-area { flex: 1; padding: 50px; position: relative; overflow-y: auto; }
.tab-content { display: none; animation: fadeInRight 0.5s ease-out forwards; }
.tab-content.active { display: block; }
.feature-icon { font-size: 4rem; margin-bottom: 20px; display: inline-block; animation: float 3s infinite ease-in-out; filter: drop-shadow(0 0 15px var(--primary-gold)); }
.tab-content h3 { font-size: 2.5rem; color: var(--primary-gold); margin-bottom: 20px; text-shadow: 0 0 10px rgba(255,215,0,0.3); }
.tab-content p { font-size: 1.2rem; color: #ddd; line-height: 1.8; margin-bottom: 15px; }
.tab-content ul, .tab-content ol { padding-left: 30px; font-size: 1.15rem; color: #ccc; margin-bottom: 20px; line-height: 1.8; }
.tab-content li { margin-bottom: 10px; }
.game-term { color: var(--primary-cyan); font-weight: bold; text-shadow: 0 0 5px var(--primary-cyan-glow); }

/* News Grid - 3D Hover Cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; perspective: 1000px; }
.news-card {
  background: var(--bg-surface); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 15px; padding: 35px;
  position: relative; transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); transform-style: preserve-3d;
}
.news-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 15px; background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}
.news-card:hover {
  transform: translateY(-15px) rotateX(5deg) rotateY(-5deg);
  border-color: var(--primary-cyan); box-shadow: 0 20px 40px rgba(0,240,255,0.2), inset 0 0 20px rgba(0,240,255,0.05);
}
.news-date { color: var(--primary-cyan); font-weight: 800; font-size: 1.1rem; margin-bottom: 15px; letter-spacing: 1px; }
.news-card h3 { font-size: 1.6rem; color: var(--primary-gold); margin-bottom: 15px; text-transform: none; }
.news-card p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; }

/* Timer Section */
.timer-large-container {
  width: 100%; max-width: 1040px; height: 1065px; margin: 0 auto;
  background: #fff; border-radius: 20px; border: var(--glass-border);
  box-shadow: 0 0 40px rgba(0,240,255,0.1); overflow: hidden;
  position: relative; display: flex; justify-content: center;
}
.timer-large-container iframe {
  width: 800px; height: 820px; border: none; transform: scale(1.3); transform-origin: top center; margin: 0; display: block; overflow: hidden;
}

/* Animations */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-scale { transform: scale(0.8); }
.reveal-scale.active { transform: scale(1); }

/* Character Greeting */
.character-welcome-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; align-items: flex-end;
  pointer-events: none;
}
.character-sprite {
  width: 280px; height: auto; animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0,240,255,0.4)); transition: 0.5s;
}
.speech-bubble {
  background: rgba(14, 18, 42, 0.95); border: 2px solid var(--primary-cyan);
  border-radius: 20px 20px 0 20px; padding: 20px; color: #fff; font-size: 1.2rem;
  max-width: 300px; margin-right: -20px; margin-bottom: 180px;
  box-shadow: 0 0 30px rgba(0,240,255,0.3); pointer-events: auto; font-family: var(--font-modern);
  font-weight: 600; text-align: center;
}
.speech-bubble::after {
  content: ''; position: absolute; bottom: -12px; right: 25px;
  border-width: 12px 12px 0 0; border-style: solid; border-color: var(--primary-cyan) transparent transparent transparent;
}

/* Footer */
footer {
  text-align: center; padding: 60px 20px; background: rgba(0,0,0,0.8);
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: 50px;
}
footer p { font-size: 1.1rem; color: var(--text-muted); }

#music-widget { position: fixed; bottom: 25px; left: 25px; z-index: 1000; display: flex; gap: 15px; }
.music-btn {
  background: rgba(14, 18, 42, 0.8); color: var(--primary-cyan); border: 1px solid var(--primary-cyan);
  padding: 12px 25px; border-radius: 50px; cursor: pointer; font-weight: bold; font-family: var(--font-epic);
  transition: 0.3s; backdrop-filter: blur(10px); box-shadow: 0 0 15px rgba(0,240,255,0.2);
}
.music-btn:hover { background: var(--primary-cyan); color: #000; box-shadow: 0 0 25px var(--primary-cyan); transform: scale(1.05); }

/* Guide & Command Sections */
.setup-header { padding: 120px 20px 60px; text-align: center; }
.setup-header h1 { font-size: 3.5rem; color: var(--primary-cyan); text-shadow: 0 0 20px var(--primary-cyan-glow); }
.setup-header p { font-size: 1.2rem; color: var(--text-muted); }

.guide-container {
  max-width: 900px; margin: 0 auto; padding: 40px; border-radius: 20px;
  background: var(--bg-surface); backdrop-filter: blur(15px);
  border: var(--glass-border); box-shadow: var(--glass-shadow);
}

.command-card {
  display: flex; align-items: center; gap: 25px; padding: 25px; border-radius: 15px;
  background: rgba(0,0,0,0.4); border-left: 4px solid var(--primary-magenta);
  margin-bottom: 25px; transition: 0.3s;
}
.command-card:hover {
  transform: translateX(10px); border-left-color: var(--primary-cyan);
  background: rgba(0, 240, 255, 0.05); box-shadow: 0 10px 20px rgba(0,240,255,0.1);
}
.command-badge {
  font-family: var(--font-epic); font-size: 1.6rem; color: #fff; font-weight: bold;
  background: linear-gradient(45deg, var(--primary-magenta), #8000ff);
  padding: 10px 25px; border-radius: 50px; box-shadow: 0 5px 15px rgba(255, 0, 127, 0.4);
  white-space: nowrap;
}
.command-info h3 { font-size: 1.5rem; color: var(--primary-cyan); margin-bottom: 5px; text-transform: none; }
.command-info p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; }

/* Setup & Rules Pages Enhancements */
.download-box {
  background: rgba(255, 0, 85, 0.15); border: 2px solid #ff0055;
  border-radius: 20px; padding: 40px; margin: 40px auto; max-width: 900px; text-align: center;
  box-shadow: 0 0 30px rgba(255, 0, 85, 0.4); animation: pulse-critical 2s infinite;
}
@keyframes pulse-critical {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 0, 85, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 40px rgba(255, 0, 85, 0.8); transform: scale(1.02); }
}

.guide-container h2 {
  font-size: 2.5rem; color: var(--primary-cyan); margin-bottom: 25px;
  border-bottom: 2px solid rgba(0, 240, 255, 0.3); padding-bottom: 15px;
}
.guide-container h3 { font-size: 1.8rem; color: #fff; margin-top: 40px; margin-bottom: 20px; text-transform: none; }

.guide-step { font-size: 1.3rem; line-height: 1.8; margin-top: 25px; margin-left: 20px; padding-left: 10px; }
.guide-step li { margin-bottom: 25px; color: var(--text-main); }
.guide-step p { margin-bottom: 15px; font-size: 1.3rem; }

.guide-image {
  margin: 25px 0; border-radius: 12px; border: 2px solid var(--primary-cyan);
  max-width: 100%; max-height: 450px; object-fit: contain; background: rgba(0,0,0,0.5);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6); transition: 0.3s;
}
.guide-image:hover { transform: scale(1.03); box-shadow: 0 15px 40px var(--primary-cyan-glow); }

.tip-box {
  background: rgba(155, 89, 182, 0.15); border-left: 5px solid #9b59b6;
  padding: 25px; margin: 30px 0; border-radius: 0 12px 12px 0;
  font-size: 1.3rem; font-weight: bold; color: var(--text-main);
}
.code-inline {
  background: rgba(0,0,0,0.8); padding: 5px 10px; border-radius: 6px;
  font-family: monospace; color: var(--primary-gold); border: 1px solid rgba(255, 215, 0, 0.4);
}

/* Media Queries */
@media (max-width: 992px) {
  .hero h1 { font-size: 4rem; }
  .tabs-container { flex-direction: column; }
  .tabs-menu { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); flex-direction: row; flex-wrap: wrap; }
  .tab-btn { flex: 1; text-align: center; padding: 15px; }
  .tab-btn::before { width: 100%; height: 4px; left: 0; bottom: 0; top: auto; transform: scaleX(0); }
  .tab-btn.active::before { transform: scaleX(1); }
  .tab-btn:hover, .tab-btn.active { padding-left: 15px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .character-sprite { width: 180px; }
  .speech-bubble { font-size: 1rem; margin-bottom: 120px; max-width: 220px; }
  .timer-large-container { height: 600px; }
  .timer-large-container iframe { transform: scale(0.8); margin-top: -50px; }
}
