body.dark-theme {
  background-color: #0f111a;
  color: #e0e0e0;
  font-family: 'Pretendard', sans-serif;
  margin: 0;
  padding: 20px;
}

.sa-container {
  max-width: 1000px;
  margin: 0 auto;
}

.hidden { display: none !important; }

/* Search Section */
.search-section {
  text-align: center;
  padding: 50px 0;
  border-bottom: 1px solid #1f2233;
}

.search-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.search-bar input {
  padding: 12px 20px;
  width: 300px;
  background: #1a1d2e;
  border: 1px solid #2d3356;
  border-radius: 8px;
  color: white;
  font-size: 16px;
}

.search-bar button {
  padding: 12px 30px;
  background: #00d2ff;
  border: none;
  border-radius: 8px;
  color: #0f111a;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-bar button:hover { opacity: 0.8; }

/* Player Card */
.sa-card {
  background: #1a1d2e;
  border: 1px solid #2d3356;
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.sa-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 25px;
  border-bottom: 2px solid #2d3356;
  padding-bottom: 15px;
}

.profile-main { display: flex; align-items: center; gap: 12px; }
.rank-icon-wrapper { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.rank-icon { max-width: 100%; max-height: 100%; object-fit: contain; }
.nickname { font-size: 32px; font-weight: bold; color: #00d2ff; }
.clan-name { font-size: 18px; color: #ffcc00; font-weight: 600; }

.profile-sub { display: flex; gap: 10px; color: #888; font-size: 16px; padding-left: 44px; }
.rank-name { color: #fff; font-weight: 500; }
.season-rank { font-style: italic; }

.sa-body {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.tier-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: rgba(255, 255, 255, 0.02);
  padding: 15px;
  border-radius: 12px;
}

.tier-item {
  display: flex;
  flex-direction: column;
  padding: 15px;
  border-radius: 8px;
  background: #141724;
  border: 1px solid #2d3356;
}

.tier-item.party { border-top: 3px solid #ffcc00; }
.tier-item.solo { border-top: 3px solid #00d2ff; }

.tier-item label { font-size: 12px; color: #888; margin-bottom: 10px; }

.tier-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.tier-medal {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.tier-text {
  display: flex;
  flex-direction: column;
}

.tier-value { font-size: 18px; font-weight: 800; color: #fff; }
.tier-score { font-size: 14px; color: #00d2ff; margin-top: 2px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-left: 10px;
}

.stat-item label { display: block; color: #888; margin-bottom: 5px; font-size: 14px; }
.stat-item span { font-size: 20px; font-weight: 600; }

/* Stats Summary Card */
.stats-summary-card {
  background: #1a1d2e;
  border: 1px solid #2d3356;
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 30px;
}

.stats-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2d3356;
}

.stats-summary-header h3 { margin: 0; font-size: 18px; color: #aaa; }
.most-played-map { font-size: 14px; color: #888; }
.most-played-map strong { color: #ffcc00; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.stat-box {
  background: #141724;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.stat-box label { display: block; color: #888; font-size: 12px; margin-bottom: 8px; }
.stat-box .value { font-size: 20px; font-weight: bold; }
.stat-box .value.highlight { color: #fff; }

/* Recent Searches */
.recent-searches {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 35px;
}

.recent-searches span { color: #666; font-size: 13px; }

.search-chip {
  background: #1f2233;
  border: 1px solid #2d3356;
  color: #aaa;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-chip:hover {
  background: #2d3356;
  color: #00d2ff;
  border-color: #00d2ff;
}

/* Advanced Loading UI */
#loading {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

#loading p { color: #00d2ff; font-weight: 500; font-size: 15px; }

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 210, 255, 0.1);
  border-left-color: #00d2ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* KD Colors */
.kd-normal { color: #fff; }
.kd-high { color: #00d2ff; text-shadow: 0 0 5px rgba(0, 210, 255, 0.5); }
.kd-pro { color: #bc00ff; text-shadow: 0 0 8px rgba(188, 0, 255, 0.6); }
.kd-god { color: #ffcc00; text-shadow: 0 0 10px rgba(255, 204, 0, 0.8); animation: shine 2s infinite; }

@keyframes shine {
  0% { opacity: 0.8; }
  50% { opacity: 1; text-shadow: 0 0 15px rgba(255, 204, 0, 1); }
  100% { opacity: 0.8; }
}

/* Match History */
.history-section h2 { margin-top: 40px; margin-bottom: 20px; }

.match-list { list-style: none; padding: 0; margin: 0; }
.match-item {
  display: grid;
  grid-template-columns: 100px 1fr 150px 120px;
  align-items: center;
  padding: 15px 20px;
  background: #141724;
  margin-bottom: 12px;
  border-radius: 8px;
  border-left: 5px solid #2d3356;
  transition: transform 0.2s;
}

.match-item:hover { transform: translateX(5px); }

.match-item.win { border-left-color: #00ff88; background: linear-gradient(90deg, rgba(0, 255, 136, 0.05) 0%, rgba(20, 23, 36, 1) 100%); }
.match-item.lose { border-left-color: #ff4d4d; background: linear-gradient(90deg, rgba(255, 77, 77, 0.05) 0%, rgba(20, 23, 36, 1) 100%); }

.match-info { display: flex; flex-direction: column; gap: 6px; }
.type-tag { font-size: 10px; background: #2d3356; color: #aaa; padding: 2px 6px; border-radius: 4px; width: fit-content; text-transform: uppercase; }

.result-badge { font-weight: 800; font-size: 14px; }
.win .result-badge { color: #00ff88; }
.lose .result-badge { color: #ff4d4d; }

.match-map-info { display: flex; flex-direction: column; gap: 4px; }
.map { color: #eee; font-weight: 600; font-size: 16px; }
.match-date { font-size: 12px; color: #666; }

.kda { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: #bbb; }
.kd { text-align: right; font-weight: 900; font-size: 16px; }
