:root {
  --primary: #1b5e20;
  --primary-light: #2e7d32;
  --primary-bg: #e8f5e9;
  --accent: #d4af37;
  --dark: #1f2937;
  --gray: #6b7280;
  --card-bg: #ffffff;
  --body-bg: #f3f4f6;
  --danger: #dc2626;
}

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

body {
  font-family: 'Hind Siliguri', sans-serif;
  background-color: var(--body-bg);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.qibla-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.qibla-header .badge {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.qibla-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.qibla-header p {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 24px;
}

/* Compass Dial Design */
.compass-wrapper {
  position: relative;
  width: 270px;
  height: 270px;
  margin-bottom: 24px;
}

.target-marker {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 14px solid var(--accent);
  z-index: 10;
}

.compass-dial {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 60%, #f9fafb 100%);
  border: 8px solid #e5e7eb;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.07), 0 8px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: transform 0.1s cubic-bezier(0.1, 0.8, 0.2, 1);
  will-change: transform;
}

.dial-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.crosshair-v {
  position: absolute;
  top: 15%;
  bottom: 15%;
  left: 50%;
  width: 1px;
  background: #e5e7eb;
  transform: translateX(-50%);
}

.crosshair-h {
  position: absolute;
  left: 15%;
  right: 15%;
  top: 50%;
  height: 1px;
  background: #e5e7eb;
  transform: translateY(-50%);
}

.cardinal {
  position: absolute;
  font-size: 15px;
  font-weight: 700;
  user-select: none;
}

.cardinal.north {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--danger);
}

.cardinal.east {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
}

.cardinal.south {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gray);
}

.cardinal.west {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
}

/* Qibla Needle Marker */
.qibla-needle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.needle-tip {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kaaba-icon {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Metrics Section */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
}

.metric-box {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-box .label {
  font-size: 13px;
  color: var(--gray);
}

.metric-box strong {
  font-size: 18px;
  color: var(--primary);
  font-weight: 700;
}

.status-box {
  font-size: 14px;
  color: var(--gray);
  min-height: 22px;
  margin-bottom: 20px;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

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

.btn-primary:active {
  transform: scale(0.98);
}
