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

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --text: #202124;
  --text-secondary: #5f6368;
  --border: #dadce0;
  --success: #0d904f;
  --success-bg: #e6f4ea;
  --warning: #e37400;
  --warning-bg: #fef7e0;
  --danger: #d93025;
  --danger-bg: #fce8e6;
  --safe-bg: #e6f4ea;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a2e;
    --bg-alt: #16213e;
    --text: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border: #333;
    --primary-light: #1e3a5f;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.5);
    --success-bg: #1a3a2a;
    --warning-bg: #3a2e1a;
    --danger-bg: #3a1a1a;
    --safe-bg: #1a3a2a;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* === Header === */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.header p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* === Navigation === */
.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-tab {
  padding: 1rem 1.5rem;
  border: none;
  background: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  flex: 1;
  max-width: 250px;
  text-align: center;
}

.nav-tab:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* === Container === */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

/* === Sections === */
.section {
  display: none;
  padding: 1rem 0;
}

.section.active {
  display: block;
}

/* === Input Card === */
.input-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.input-card h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.form-group select,
.form-group input[type="number"],
.form-group input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === Rate Info === */
.rate-info {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* === Results === */
.results-area {
  margin-top: 1rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.results-header h2 {
  font-size: 1.2rem;
}

.sort-select {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
}

/* === Service Card === */
.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.service-card.best-value {
  border-color: var(--success);
  border-width: 2px;
}

.best-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--success);
  color: white;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.service-emoji {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
}

.service-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.service-speed {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.service-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-item {
  background: var(--bg-alt);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.detail-value.highlight {
  color: var(--success);
}

.service-pros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.pro-tag {
  background: var(--success-bg);
  color: var(--success);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.con-tag {
  background: var(--warning-bg);
  color: var(--warning);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.service-cta {
  display: block;
  width: 100%;
  padding: 0.75rem;
  text-align: center;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.service-cta:hover {
  background: var(--primary-dark);
}

/* === Safety Stars === */
.safety-stars {
  color: var(--warning);
  font-size: 0.85rem;
}

/* === Scam Checker === */
.scam-input-area {
  margin-bottom: 1.5rem;
}

.scam-input-area textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
}

.scam-input-area textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.scam-result {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.scam-result.danger {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.scam-result.caution {
  border-color: var(--warning);
  background: var(--warning-bg);
}

.scam-result.safe {
  border-color: var(--success);
  background: var(--safe-bg);
}

.scam-result-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.risk-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.risk-badge.danger {
  background: var(--danger);
  color: white;
}

.risk-badge.caution {
  background: var(--warning);
  color: white;
}

.risk-badge.safe {
  background: var(--success);
  color: white;
}

.scam-result h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.scam-result p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.scam-result .advice {
  font-weight: 500;
  color: var(--text);
  padding: 0.75rem;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}

/* === Common Scams List === */
.common-scams {
  margin-top: 2rem;
}

.common-scams h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.scam-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.scam-item:hover {
  background: var(--primary-light);
}

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

.scam-item h3 {
  font-size: 0.95rem;
}

.scam-item-body {
  display: none;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.scam-item.open .scam-item-body {
  display: block;
}

.chevron {
  transition: transform 0.2s;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.scam-item.open .chevron {
  transform: rotate(180deg);
}

/* === No Results === */
.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

/* === Loading === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  color: var(--text-secondary);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* === Footer === */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* === Disclaimer === */
.disclaimer {
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 1.5rem 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.disclaimer strong {
  color: var(--warning);
}

/* === Currency Not Supported === */
.currency-warning {
  background: var(--warning-bg);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--warning);
  margin-top: 0.5rem;
}

/* === Responsive === */
@media (min-width: 768px) {
  .header {
    padding: 3rem 2rem;
  }

  .header h1 {
    font-size: 2.4rem;
  }

  .header p {
    font-size: 1.15rem;
  }

  .container {
    padding: 1.5rem;
  }

  .service-details {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

@media(max-width:480px){h1{font-size:1.3rem}.container{padding:10px}body{font-size:14px}}
