:root {
  --bg-color: #f7f9fc;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --primary-blue: #2563eb;
  --primary-purple: #7c3aed;
  --gradient: linear-gradient(135deg, #2563eb, #7c3aed);
  --gradient-soft: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(124,58,237,0.1));
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --status-green: #22c55e;
  --font-mono: 'Courier New', Courier, monospace;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --grid-bg: url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%23e2e8f0" stroke-width="1"/></svg>');
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  background-image: var(--grid-bg);
  color: var(--text-color);
  line-height: 1.6;
  padding-bottom: 70px; /* Space for mobile bar */
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; border: none; cursor: pointer; }

/* Global components */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.pulse-dot {
  display: inline-block; width: 8px; height: 8px; background-color: var(--status-green); border-radius: 50%; margin-right: 8px;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.mono { font-family: var(--font-mono); }
.section-header { margin-bottom: 30px; }
.section-header h2 { font-size: 24px; display: flex; align-items: center; margin-bottom: 8px; }
.section-header p { color: var(--text-muted); font-size: 14px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-family: var(--font-mono);
  background: var(--gradient-soft); color: var(--primary-blue); border: 1px solid rgba(37,99,235,0.2);
}
.btn-download {
  display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border-radius: var(--radius-md);
  background: var(--gradient); color: white; font-weight: bold; font-size: 16px; transition: opacity 0.2s;
}
.btn-download:active { opacity: 0.8; }
.cover-img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md) var(--radius-md) 0 0; }

/* Header */
header {
  position: sticky; top: 0; z-index: 100; background: rgba(247, 249, 252, 0.95);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo-area { display: flex; align-items: center; gap: 10px; font-weight: bold; font-size: 18px; }
.logo-area img { height: 32px; }
.nav-links { display: flex; gap: 16px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { font-size: 14px; color: var(--text-muted); padding: 8px 12px; border-radius: 8px; transition: all 0.2s; }
.nav-links a:hover { background: var(--gradient-soft); color: var(--primary-blue); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.search-box { display: none; }
.nav-download-btn { display: none; }

/* Hero */
.hero { padding: 40px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.dialog-box {
  background: var(--card-bg); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-md); border: 1px solid var(--border-color);
}
.hero h1 { font-size: 28px; margin-bottom: 16px; line-height: 1.3; }
.hero-desc { color: var(--text-muted); margin-bottom: 24px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-item { background: var(--bg-color); padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.stat-item .num { font-size: 18px; font-weight: bold; color: var(--primary-blue); }
.stat-item .label { font-size: 12px; color: var(--text-muted); }
.hero-downloads { display: flex; gap: 12px; flex-direction: column; }
.hero-cover-flow { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.hero-cover-flow::-webkit-scrollbar { display: none; }
.hero-cover-card {
  flex: 0 0 110px; position: relative; border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border-color); background: var(--card-bg);
}
.hero-cover-card .cover-img { aspect-ratio: 3/4; }
.hero-cover-card .tag {
  position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; backdrop-filter: blur(4px);
}

/* Recommendations */
.recommendations { padding: 40px 0; }
.recommend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.recommend-card {
  background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm); transition: transform 0.2s; position: relative;
}
.recommend-card:active { transform: scale(0.98); }
.recommend-card .cover-img { aspect-ratio: 3/4; }
.card-info { padding: 12px; }
.card-info h3 { font-size: 14px; margin-bottom: 6px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tags span { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--bg-color); color: var(--text-muted); border: 1px solid var(--border-color); font-family: var(--font-mono); }

/* Queue */
.queue { padding: 40px 0; }
.queue-timeline { display: flex; flex-direction: column; gap: 24px; }
.queue-batch { background: var(--card-bg); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border-color); }
.batch-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-family: var(--font-mono); }
.batch-header.active { color: var(--primary-blue); font-weight: bold; }
.queue-items { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.queue-item { flex: 0 0 90px; }
.queue-item .cover-img { aspect-ratio: 3/4; border-radius: 8px; }
.queue-item .title { font-size: 12px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-status { font-size: 10px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.status-done { color: var(--status-green); }
.status-wait { color: var(--text-muted); }
.progress-mini { height: 4px; background: var(--border-color); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.progress-mini div { height: 100%; background: var(--primary-blue); width: 100%; }
.progress-mini .running { width: 50%; animation: loading 2s infinite linear; background: var(--gradient); }
@keyframes loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

/* Ranking */
.ranking { padding: 40px 0; }
.ranking-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-color); font-size: 13px; }
.ranking-table th, .ranking-table td { padding: 12px; border-bottom: 1px solid var(--border-color); text-align: left; }
.ranking-table th { background: var(--bg-color); font-weight: normal; color: var(--text-muted); }
.rank-num { font-family: var(--font-mono); font-weight: bold; }
.rank-top1 { background: rgba(37,99,235,0.05); }
.rank-up { color: #ef4444; }
.rank-down { color: #10b981; }
.rank-cover { width: 32px; height: 44px; border-radius: 4px; object-fit: cover; }

/* Styles Grid */
.styles-grid { padding: 40px 0; }
.style-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.style-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--border-color); position: relative; overflow: hidden; }
.style-card h3 { font-size: 16px; margin-bottom: 8px; }
.style-card .meta { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 12px; }
.style-card .covers { display: flex; gap: 8px; }
.style-card .covers img { width: 50%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }

/* Exclusive */
.exclusive { padding: 40px 0; }
.exclusive-layout { display: flex; flex-direction: column; gap: 24px; }
.exclusive-main { background: var(--card-bg); border-radius: var(--radius-lg); padding: 20px; border: 2px solid transparent; background-clip: padding-box; position: relative; }
.exclusive-main::before { content: ''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px; background: var(--gradient); border-radius: calc(var(--radius-lg) + 2px); z-index: -1; }
.exclusive-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 16px; }
.exclusive-info h3 { font-size: 20px; margin-bottom: 8px; }
.exclusive-info p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.exclusive-list { display: flex; flex-direction: column; gap: 12px; }
.exclusive-item { display: flex; gap: 12px; background: var(--card-bg); padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.exclusive-item img { width: 60px; height: 80px; object-fit: cover; border-radius: 6px; }
.exclusive-item div h4 { font-size: 14px; margin-bottom: 4px; }
.exclusive-item div p { font-size: 12px; color: var(--text-muted); }

/* Free */
.free-zone { padding: 40px 0; }
.free-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.free-card { background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-color); position: relative; }
.free-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.free-card .free-tag { position: absolute; top: 8px; left: 8px; background: var(--gradient); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 99px; font-weight: bold; }
.free-card .info { padding: 10px; }
.free-card h3 { font-size: 14px; }
.free-card p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Tuner */
.tuner { padding: 40px 0; }
.tuner-layout { display: flex; flex-direction: column; gap: 30px; }
.tuner-controls { background: var(--card-bg); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border-color); }
.slider-group { margin-bottom: 20px; }
.slider-group label { display: block; margin-bottom: 10px; font-weight: bold; font-size: 14px; }
input[type=range] { -webkit-appearance: none; width: 100%; height: 8px; background: var(--border-color); border-radius: 4px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-blue); cursor: pointer; box-shadow: 0 0 10px rgba(37,99,235,0.5); }
.tuner-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tuner-card { border-radius: var(--radius-md); overflow: hidden; background: var(--card-bg); border: 1px solid var(--border-color); }
.tuner-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.tuner-card p { padding: 8px; font-size: 12px; text-align: center; }

/* Feedback */
.feedback { padding: 40px 0; }
.feedback-stats { display: flex; justify-content: space-around; background: var(--card-bg); padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); margin-bottom: 30px; text-align: center; }
.feedback-stats .num { font-size: 24px; font-weight: bold; color: var(--primary-blue); font-family: var(--font-mono); }
.feedback-stats .label { font-size: 12px; color: var(--text-muted); }
.log-stream { display: flex; flex-direction: column; gap: 16px; }
.log-item { display: flex; gap: 12px; background: var(--card-bg); padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.log-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: var(--bg-color); padding: 4px; border: 1px solid var(--border-color); }
.log-content { flex: 1; }
.log-header { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 12px; color: var(--text-muted); }
.log-nickname { font-weight: bold; color: var(--text-color); }
.log-stars { color: #fbbf24; font-size: 12px; }
.log-text { font-size: 14px; }

/* FAQ */
.faq { padding: 40px 0; }
.faq-list { display: flex; flex-direction: column; gap: 16px; }
.faq-item { background: var(--card-bg); border-radius: var(--radius-md); border: 1px solid var(--border-color); overflow: hidden; }
.faq-q { padding: 16px; font-weight: bold; background: var(--gradient-soft); cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.faq-a { padding: 16px; font-size: 14px; color: var(--text-muted); border-top: 1px solid var(--border-color); display: none; }
.faq-item.active .faq-a { display: block; }

/* Download Section */
.download-section { padding: 40px 0; }
.steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.step-card { background: var(--card-bg); padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); text-align: center; }
.step-num { display: inline-block; width: 32px; height: 32px; line-height: 32px; border-radius: 50%; background: var(--gradient); color: #fff; font-weight: bold; margin-bottom: 10px; }
.download-cards { display: flex; flex-direction: column; gap: 16px; }
.dl-card { background: var(--card-bg); padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dl-card .platform { font-size: 18px; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.dl-card .meta { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.dl-btn { width: 100%; height: 48px; background: var(--text-color); color: #fff; border-radius: var(--radius-md); font-size: 16px; font-weight: bold; display: flex; align-items: center; justify-content: center; }
.dl-btn.ios { background: var(--primary-blue); }

/* Footer */
footer { background: #fff; padding: 40px 0 20px; border-top: 1px solid var(--border-color); font-size: 12px; color: var(--text-muted); }
.footer-status-line { border-top: 1px dashed var(--border-color); margin-bottom: 20px; position: relative; }
.footer-brand { margin-bottom: 20px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.footer-links h4 { font-size: 14px; color: var(--text-color); margin-bottom: 10px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { text-align: center; border-top: 1px solid var(--border-color); padding-top: 20px; line-height: 2; }
.footer-bottom a { color: var(--text-muted); }

/* Mobile Sticky Bar */
.mobile-sticky-bar { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; padding: 10px 16px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); display: flex; gap: 12px; z-index: 1000; border-top: 1px solid var(--border-color); }
.mobile-sticky-bar .btn-download { flex: 1; height: 44px; font-size: 14px; }
.mobile-sticky-bar .close-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--bg-color); border-radius: var(--radius-md); color: var(--text-muted); font-size: 20px; }

/* Media Queries */
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-downloads { flex-direction: row; }
  .hero-downloads .btn-download { flex: 1; }
  .recommend-grid { grid-template-columns: repeat(3, 1fr); }
  .style-cards { grid-template-columns: repeat(3, 1fr); }
  .free-grid { grid-template-columns: repeat(3, 1fr); }
  .tuner-results { grid-template-columns: repeat(3, 1fr); }
  .steps { flex-direction: row; }
  .step-card { flex: 1; }
  .download-cards { flex-direction: row; justify-content: center; }
  .dl-card { flex: 1; }
  .search-box { display: block; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 20px; padding: 6px 16px; font-size: 13px; width: 200px; outline: none; }
  .nav-download-btn { display: block; height: 36px; padding: 0 16px; line-height: 36px; background: var(--gradient); color: #fff; border-radius: 18px; font-size: 14px; font-weight: bold; }
  .mobile-sticky-bar { display: none; }
  body { padding-bottom: 0; }
  .exclusive-layout { flex-direction: row; }
  .exclusive-main { flex: 1; }
  .exclusive-list { flex: 1; }
  .tuner-layout { flex-direction: row; }
  .tuner-controls { flex: 1; }
  .tuner-content { flex: 2; }
  .faq-item.active .faq-a { display: block; }
}

@media (min-width: 1024px) {
  .recommend-grid { grid-template-columns: repeat(4, 1fr); }
  .style-cards { grid-template-columns: repeat(4, 1fr); }
  .free-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-cover-flow { display: grid; grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .recommend-grid { grid-template-columns: repeat(5, 1fr); }
  .free-grid { grid-template-columns: repeat(4, 1fr); }
}