:root {
  --primary: #ff8c00;
  --primary-soft: rgba(255, 140, 0, 0.15);
  --bg: #f0f2f5;
  --surface: #ffffff;
  --text-main: #1c1e21;
  --text-muted: #65676b;
  --border: #e4e6eb;
  --skeleton-base: #e4e6eb;
  --success: #31a24c;
  --to: #ffedd5;
  --to-text: #b45309;  
  --flag-bg: #fff;
  --flag-border: 0.5px solid #444;
  
      
}

@media (prefers-color-scheme: dark) {
  :root {
    --primaryx:#ff8c00;
    --bg: #18191a;
    --surface: #242526;
    --text-main: #e4e6eb;
    --text-muted: #b0b3b8;
    --border: #3e4042;
    --skeleton-base: #3a3b3c;
    --to: #3a2b1a;
    --to-text: #ffb347;
    --flag-border: 0.5px solid #333;
    
    
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  backdrop-filter: blur(10px);
  z-index: 100;
}

h1 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

main {
  width: 100%;
  max-width: 600px;
  padding: 40px 8px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  padding:30px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.status-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ccc;
}
.status-dot.active { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.warning { background: var(--primary); }

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.data-row:last-child { border-bottom: none; }

.label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.value-container {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
}

.value {
  font-family: 'SF Mono', 'Roboto Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--primaryx);
  word-break: break-all;
  white-space: normal;
  text-align: right;
  max-width: 100%;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}
.btn-icon:hover { color: var(--primary); }

.skeleton {
  background: var(--skeleton-base);
  border-radius: 4px;
  animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
  0%,100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.skeleton-text { height: 16px; width: 120px; }
.skeleton-text-sm { height: 12px; width: 80px; }
.skeleton-flag { width: 24px; height: 16px; border-radius: 2px; }

.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 55px;
  height: 55px;
  background:var(--primary);
  color: white;
  border: none;
  opacity: 0.8;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(255,140,0,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 500;
}
.fab:active { transform: scale(0.95); }
.fab:disabled { background: var(--text-muted); cursor: not-allowed; box-shadow: none; }
.fab.loading i { animation: spin 1s linear infinite; }

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

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--to);
  color: var(--to-text);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.flag-icon {
  width: 30px;
  height: 22px;
  object-fit: cover;
  border-radius: 1px;
  background: var(--flag-bg);
  border: var(--flag-border);
  box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border 0.3s ease;  
  filter: none !important;
  mix-blend-mode: normal !important;
  color-scheme: only light;
  transform-origin: center center;
  cursor: zoom-in;
}

/* Hover / Touch zoom effect */
.flag-icon:hover,
.flag-icon:active {
  transform: scale(4.5);
  z-index: 999;
  box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
}

.hidden { display: none !important; }
