﻿:root {
  --bg-color: #0d0d0d;
  --panel-bg: rgba(20, 20, 20, 0.8);
  --border-color: #3b2a1a;
  --text-primary: #e0d5c1;
  --text-secondary: #8c7c6a;
  --accent-red: #8b0000;
  --accent-glow: #ff4500;
  --gold: #c5a059;
  --font-serif: 'Cinzel', 'Playfair Display', serif;
  --font-sans: 'Inter', 'Roboto', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at center, #1a0f0a 0%, #000000 100%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 獨立旋轉的時空門特效 */
.portal-ring {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90vmin;
    height: 90vmin;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen; /* 將純黑背景變透明，只留下發光的魔法陣 */
    pointer-events: none; /* 允許滑鼠穿透點擊 */
    z-index: -1;
    animation: portalSpin 120s linear infinite; /* 非常緩慢且優雅的轉動 */
    opacity: 0.85; /* 讓光芒微微融合背景 */
}
@keyframes portalSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 閃電特效 */
@keyframes lightningFlash {
    0%, 95%, 98%, 100% { opacity: 0; }
    96%, 99% { opacity: 0.8; }
}
.lightning-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    animation: lightningFlash 8s infinite;
}

/* 粒子雨特效 */
.particles-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, rgba(197, 160, 89, 0), rgba(197, 160, 89, 0.8));
    animation: fall linear infinite;
}
@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-glow);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--accent-red);
  text-shadow: 0 0 15px var(--accent-red);
  font-weight: bold;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-red);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--accent-red);
}

.nav-links a:hover::after {
  width: 100%;
}

.btn {
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--gold);
  background: rgba(20, 20, 20, 0.6);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
  box-shadow: 0 0 15px var(--accent-red);
}

.btn-primary {
  background: var(--accent-red);
  border-color: #5a0000;
  color: white;
}

.btn-primary:hover {
  background: #a00000;
  box-shadow: 0 0 20px var(--accent-red);
}

/* Hero Section */
.hero {
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 20px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(139, 0, 0, 0.15) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--accent-red);
  text-shadow: 0 0 20px rgba(139,0,0,0.8), 2px 2px 4px #000;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Sections */
.section {
  padding: 5rem 5%;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 2px;
  background: var(--accent-red);
  margin: 1rem auto;
  box-shadow: 0 0 10px var(--accent-red);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 15px rgba(139,0,0,0.2);
  border-color: var(--gold);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.price {
  font-size: 1.8rem;
  color: var(--accent-glow);
  font-weight: bold;
  font-family: var(--font-serif);
  margin-bottom: 1rem;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gold);
  font-family: var(--font-serif);
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
}

/* Specific feature: Find Game Request Banner */
.request-banner {
  background: linear-gradient(45deg, #1a0a0a, #0a0a0a);
  border: 1px solid var(--accent-red);
  padding: 3rem;
  text-align: center;
  margin-top: 4rem;
  position: relative;
}

.request-banner h2 {
  color: white;
  text-shadow: 0 0 10px var(--accent-red);
}

.request-banner p {
  margin: 1rem 0 2rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: var(--font-sans);
}
.chatbot-btn {
    width: 60px;
    height: 60px;
    background: var(--accent-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(139,0,0,0.8);
    border: 2px solid var(--gold);
    transition: transform 0.3s;
}
.chatbot-btn:hover {
    transform: scale(1.1);
}
.chatbot-body {
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    height: 400px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.9);
    border-radius: 10px;
    overflow: hidden;
}
.chatbot-header {
    background: var(--panel-bg);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--gold);
    font-family: var(--font-serif);
    text-align: center;
}
.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.chat-message {
    padding: 0.8rem;
    border-radius: 8px;
    max-width: 80%;
    font-size: 0.9rem;
}
.bot-message {
    background: #2a0a0a;
    border: 1px solid #4a1a1a;
    color: var(--text-primary);
    align-self: flex-start;
}
.user-message {
    background: #1a1a1a;
    border: 1px solid var(--gold);
    color: var(--gold);
    align-self: flex-end;
}
.chat-input-area {
    display: flex;
    border-top: 1px solid var(--border-color);
}
.chat-input-area input {
    flex: 1;
    padding: 1rem;
    background: #000;
    border: none;
    color: white;
}
.chat-input-area input:focus {
    outline: none;
}
.chat-input-area button {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 0 1rem;
    cursor: pointer;
}
