/* ==========================================
   LF2 Web Remaster Launcher - CSS Design
   ========================================== */

/* 全局与变量定义 */
:root {
  --bg-color: #080b16;
  --panel-bg: rgba(15, 20, 39, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --primary: #6366f1;       /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.4);
  --secondary: #ec4899;     /* Pink */
  --accent: #3b82f6;        /* Blue */
  --neon-green: #10b981;    /* Green */
  --card-radius: 16px;
  --btn-radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* 霓虹背景发光球 */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
}
.bg-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
  animation: float 20s infinite alternate;
}
.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: 10%;
  right: -100px;
  animation: float 25s infinite alternate-reverse;
}
.bg-glow-3 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

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

/* 主容器 */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header 头部区 */
.header {
  text-align: center;
  margin-bottom: 40px;
}
.logo-area {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}
.badge {
  font-size: 0.75rem;
  letter-spacing: 2px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}
.title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 5px;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 40%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(129, 140, 248, 0.3));
}
.subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.description {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* 启动游戏大卡片 */
.launch-card {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 50px 30px;
  text-align: center;
  backdrop-filter: blur(20px);
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.game-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--neon-green);
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 30px;
}
.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-green);
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.btn-launch {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border: none;
  color: white;
  font-size: 1.6rem;
  font-weight: 700;
  padding: 18px 48px;
  border-radius: var(--btn-radius);
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4), 
              inset 0 1px 0 rgba(255, 255, 255, 0.2), 
              0 0 0 0px rgba(99, 102, 241, 0.7);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}
.btn-launch:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.5), 
              inset 0 1px 0 rgba(255, 255, 255, 0.3), 
              0 0 0 6px rgba(99, 102, 241, 0.15);
}
.btn-launch:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}
.launch-tips {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 选项卡选项区 */
.tabs-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tabs-nav {
  display: flex;
  background: rgba(15, 20, 39, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 5px;
  align-self: center;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.tabs-content {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 35px;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  min-height: 350px;
}
.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}
.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 操作指南子网格 */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
@media (max-width: 768px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }
}
.control-box h3 {
  font-size: 1.15rem;
  margin-bottom: 20px;
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}
.key-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 10px 16px;
  border-radius: 8px;
}
.key-name {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.kbd {
  background: #1e293b;
  color: var(--text-primary);
  border: 1px solid #475569;
  border-bottom: 3px solid #334155;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  min-width: 32px;
  text-align: center;
}
.kbd-action {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.controls-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* 角色招式表模块 */
.wiki-container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 25px;
  height: 500px;
}
@media (max-width: 768px) {
  .wiki-container {
    grid-template-columns: 1fr;
    height: auto;
  }
}
/* 左侧头像栏 */
.char-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 8px;
}
/* 美化滚动条 */
.char-sidebar::-webkit-scrollbar {
  width: 4px;
}
.char-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.char-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.char-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}
.char-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}
.char-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.char-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.char-btn.active .char-avatar-circle {
  box-shadow: 0 0 10px var(--primary);
}

/* 右侧详情 */
.char-detail {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 24px;
  overflow-y: auto;
  height: 100%;
}
.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  gap: 15px;
}
.bounce-item {
  font-size: 3rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 角色具体排版 */
.char-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}
.char-header-title h2 {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.char-header-title p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.char-badge-type {
  font-size: 0.75rem;
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.moves-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.move-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}
.move-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.move-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.move-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.move-cost {
  font-size: 0.8rem;
  color: #f43f5e;
  font-weight: 600;
  background: rgba(244, 63, 94, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}
.move-instruction {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.plus-sign {
  color: var(--text-secondary);
  font-weight: bold;
}
.move-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 关于与调试选项卡 */
.about-content h3 {
  font-size: 1.15rem;
  margin-top: 25px;
  margin-bottom: 12px;
  color: var(--text-primary);
  border-left: 3px solid var(--secondary);
  padding-left: 10px;
}
.about-content h3:first-child {
  margin-top: 0;
}
.about-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 15px;
}
.about-content ul {
  list-style-position: inside;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 页脚 */
.footer {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==========================================
   游戏悬浮窗口 (Modal Cinema Mode)
   ========================================== */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(3, 4, 10, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.game-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
}
.modal-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}
.modal-actions {
  display: flex;
  gap: 12px;
}
.modal-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}
.modal-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}
.close-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
  color: white;
}

.modal-body {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}

/* 4:3 比例包裹容器 */
.iframe-wrapper {
  width: 100%;
  max-width: 900px; /* LF2 推荐窗口宽度 */
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
}
.iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 浏览器原生全屏情况下的特殊处理 */
.iframe-wrapper:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
}
.iframe-wrapper:fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
}

/* 移动端/手机屏幕的特殊适配 */
@media (max-width: 768px) {
  .game-modal {
    padding: 0;
  }
  .modal-body {
    padding: 0;
  }
  .iframe-wrapper {
    max-width: none;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    border: none;
  }
}
