/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #0a0a1a;
  color: #e0e0e0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 1.3rem;
}

.brand-logo {
  height: 40px;
  width: 40px;
  border-radius: 10px;
  vertical-align: middle;
}

.brand-text {
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Server Selector */
.header-servers {
  display: flex;
  gap: 12px;
}

.select-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.select-group label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
}

.select-group select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #ccc;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.select-group select:hover {
  border-color: rgba(102,126,234,0.4);
}

.select-group select option {
  background: #1a1a2e;
  color: #ccc;
}

/* ===== SERVER SECTION (below test) ===== */
.server-section {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding-bottom: 10px;
}

.server-section .select-group label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.server-section .select-group select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #aaa;
  padding: 8px 14px;
  font-size: 0.85rem;
  min-width: 140px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.server-section .select-group select:hover {
  border-color: rgba(102,126,234,0.3);
  color: #ddd;
}

.server-section .select-group select option {
  background: #1a1a2e;
  color: #ccc;
}

/* ===== LANGUAGE PICKER ===== */
.lang-picker {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #ddd;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(102,126,234,0.4);
}

.lang-arrow {
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform 0.2s;
}

.lang-picker.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  background: #1e1e36;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  padding: 6px;
  z-index: 1000;
  list-style: none;
}

.lang-picker.open .lang-menu {
  display: block;
}

.lang-menu li {
  margin: 0;
}

.lang-menu li button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #bbb;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  text-align: left;
}

.lang-menu li button:hover {
  background: rgba(102,126,234,0.15);
  color: #fff;
}

.lang-menu li button.active {
  background: rgba(102,126,234,0.12);
  color: #a78bfa;
  font-weight: 600;
}

.lang-menu li button.active::after {
  content: ' ✓';
  margin-left: auto;
  opacity: 0.7;
}

/* ===== HERO ===== */
.hero {
  padding: 40px 0 30px;
  text-align: center;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 30px;
}

.hero-subtitle strong {
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

/* ===== SPEED TEST TOOL ===== */
.speedtest-wrapper {
  background: rgba(255,255,255,0.03);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  border-radius: 20px;
  padding: 30px 20px;
  margin-bottom: 20px;
}

.speed-gauge {
  margin: 10px auto;
  text-align: center;
}

.gauge-value {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  min-height: 80px;
  transition: all 0.3s ease;
}

.gauge-unit {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.gauge-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* Start Button */
.start-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin: 20px auto;
  display: block;
}

.btn-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 40px rgba(102,126,234,0.25);
}

.btn-circle:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(102,126,234,0.4);
}

.btn-circle:active {
  transform: scale(0.95);
}

.btn-circle.testing {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(102,126,234,0.25); }
  50% { box-shadow: 0 0 80px rgba(102,126,234,0.5); }
}

.btn-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}

/* Results */
.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.result-item {
  background: rgba(255,255,255,0.03);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  border-radius: 14px;
  padding: 18px 8px;
  transition: all 0.3s ease;
}

.result-item.active {
  box-shadow: 0 2px 16px rgba(102,126,234,0.15);
  background: rgba(102,126,234,0.08);
}

.result-icon { font-size: 1.4rem; margin-bottom: 6px; }
.result-value { font-size: 1.6rem; font-weight: 700; }
.result-label { font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-top: 3px; }
.result-unit { font-size: 0.7rem; color: rgba(255,255,255,0.25); }

/* Progress */
.progress-area {
  margin-top: 15px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.3;
  transition: opacity 0.3s;
}

.progress-bar.active { opacity: 1; }

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  margin-top: 6px;
  letter-spacing: 2px;
}

.result-summary {
  margin-top: 15px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.2);
  min-height: 20px;
}

/* IP Info */
.ip-info {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.03);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  border-radius: 10px;
  font-size: 0.8rem;
}

.ip-item { display: flex; align-items: center; gap: 6px; }

.ip-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.ip-value {
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

.ip-divider {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.08);
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  padding: 50px 0;
}

.content-section.alt-bg {
  background: rgba(255,255,255,0.015);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #667eea, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
}

/* Content Cards */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.content-card {
  background: rgba(255,255,255,0.03);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border-radius: 14px;
  padding: 24px 18px;
  text-align: center;
}

.card-icon { font-size: 2rem; margin-bottom: 10px; }

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.9);
}

.content-card p,
.tip-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}

.card-list {
  list-style: none;
  margin-top: 12px;
  text-align: left;
}

.card-list li {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #667eea;
  opacity: 0.5;
}

.card-list li strong {
  color: rgba(255,255,255,0.7);
}

/* Reason List */
.reason-list {
  max-width: 600px;
  margin: 0 auto;
}

.reason-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.reason-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.reason-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: rgba(255,255,255,0.85);
}

.reason-item p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}

/* Tips Grid */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tip-card {
  background: rgba(255,255,255,0.03);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
}

.tip-icon { font-size: 1.8rem; margin-bottom: 8px; }

/* FAQ */
.faq-container {
  max-width: 620px;
}

.faq-list {
  text-align: left;
}

.faq-item {
  background: rgba(255,255,255,0.03);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  color: rgba(255,255,255,0.3);
  transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}

.faq-answer ul {
  margin: 8px 0 0 16px;
}

.faq-answer li {
  padding: 2px 0;
}

.faq-answer strong {
  color: rgba(255,255,255,0.7);
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 30px 0;
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.8;
}

.footer strong {
  color: rgba(255,255,255,0.5);
}

.footer-meta {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  margin-top: 4px;
}

.footer-stats {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-item i {
  font-size: 0.7rem;
  opacity: 0.6;
}

.stat-divider {
  opacity: 0.3;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero-title { font-size: 1.6rem; }
  .hero-subtitle { font-size: 0.9rem; }
  .gauge-value { font-size: 3.2rem; }
  .btn-circle { width: 90px; height: 90px; }
  .result-value { font-size: 1.3rem; }
  .results { gap: 8px; }
  .result-item { padding: 14px 6px; }

  .content-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }

  .section-title { font-size: 1.2rem; }
  .content-section { padding: 30px 0; }

  .header-servers { gap: 6px; }
  .select-group label { display: none; }
  .select-group select { font-size: 0.75rem; padding: 3px 6px; }

  .ip-info { flex-wrap: wrap; gap: 10px; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.3rem; }
  .gauge-value { font-size: 2.5rem; }
  .result-value { font-size: 1rem; }
  .result-icon { font-size: 1.1rem; }
}

/* ===== FLATICON ICONS ===== */
.result-icon .fi {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #667eea, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-icon .fi {
  font-size: 2rem;
  background: linear-gradient(135deg, #667eea, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.tip-icon .fi {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #667eea, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.select-group label .fi {
  font-size: 0.85rem;
  color: rgba(102,126,234,0.6);
  -webkit-text-fill-color: rgba(102,126,234,0.6);
  vertical-align: middle;
  margin-right: 2px;
}
