/**
 * RhyRhy English - Core & Mobile-First Base Styles
 */
:root {
  --bg-color: #0F172A;
  --surface-color: #1E293B;
  --surface-color-alt: #334155;
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-border-hover: rgba(255, 255, 255, 0.16);

  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-light: #818CF8;
  --primary-glow: rgba(99, 102, 241, 0.25);

  --accent-emerald: #10B981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #F59E0B;
  --accent-rose: #F43F5E;
  --accent-sky: #38BDF8;

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;

  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Pretendard', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);

  --nav-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  scrollbar-gutter: stable;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Safe area insets for mobile notched devices */
body {
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Global Container */
.app-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

/* Typography & Headings */
h1,
h2,
h3,
h4,
h5 {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #C7D2FE;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  min-width: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--surface-color);
  color: var(--text-main);
  border: 1px solid var(--surface-border);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--surface-color-alt);
  border-color: var(--surface-border-hover);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-primary {
  background: var(--primary-glow);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-emerald {
  background: var(--accent-emerald-glow);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Shake and Fade Keyframes */
@keyframes shakeAnim {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-8px);
  }

  40%,
  80% {
    transform: translateX(8px);
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.06);
    filter: brightness(1.2);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.35s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}