:root {
  --apple-blue: #0071E3;
  --android-green: #3DDC84;
  --bg: #fbfbfd;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --surface: #ffffff;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --border: #d2d2d7;
  --card-bg: #f5f5f7;
  --warning-bg: #fff8e1;
  --warning-border: #ffcc02;
}

.dark-mode {
  --bg: #1a1a2e;
  --text: #e8eaed;
  --text-secondary: #9aa0a6;
  --surface: #232340;
  --nav-bg: rgba(26, 26, 46, 0.85);
  --border: #3c3c5e;
  --card-bg: #2a2a4a;
  --warning-bg: #3e2e00;
  --warning-border: #ffcc02;
  --apple-blue: #8ab4f8;
  --android-green: #81c995;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); }
}

@keyframes pulse-blue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(0, 113, 227, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes screenGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.animate-in {
  animation: fadeInUp 0.7s ease-out forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

.imac-float {
  animation: float 6s ease-in-out infinite;
}

.btn-pulse-green {
  animation: pulse-green 2s infinite;
}

.btn-pulse-blue {
  animation: pulse-blue 2.5s infinite;
}

.shimmer-text {
  background: linear-gradient(90deg, var(--text) 0%, var(--android-green) 50%, var(--text) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

.nav-blur {
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.color-dot {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.color-dot:hover {
  transform: scale(1.2);
}

.color-dot.selected {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text);
}

.spec-option {
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  background: var(--surface);
}

.spec-option:hover {
  border-color: var(--apple-blue);
}

.spec-option.selected {
  border-color: var(--apple-blue);
  background: color-mix(in srgb, var(--apple-blue) 8%, var(--surface));
}

.apk-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-radius: 16px;
  overflow: hidden;
}

.apk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.modal-overlay {
  animation: fadeIn 0.2s ease;
}

.modal-content {
  animation: modalPop 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.review-card {
  transition: transform 0.2s ease;
}

.review-card:hover {
  transform: scale(1.02);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.dark-mode .apk-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* Material You style toggle in dark mode */
.dark-mode .material-toggle {
  background: linear-gradient(135deg, #D0BCFF, #EADDFF);
  border-radius: 20px;
}