/* ============================================
   PickPhone - Base Styles & Reset (Enhanced)
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* === 背景渐变效果 (更柔和深邃) === */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(124, 58, 237, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 90%, rgba(0, 212, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: gradientShift 20s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.05); }
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em; /* 紧凑一点，更现代 */
}

h1 { font-size: var(--text-4xl); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: var(--text-3xl); font-weight: 700; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  color: var(--text-secondary);
  max-width: 65ch; /* 最佳阅读宽度 */
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary);
}

/* === Images === */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Buttons & Interactive === */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* === Inputs === */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
}

input:focus, textarea:focus, select:focus {
  outline: none;
}

/* === Container === */
.container {
  width: 100%;
  max-width: 1200px; /* 略微收窄，更聚焦 */
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* === Utility Classes === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-primary); }

.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* 玻璃拟态效果 */
.glass {
  background: rgba(18, 18, 22, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
}

/* === Selection === */
::selection {
  background: rgba(0, 212, 255, 0.3);
  color: #fff;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* === Components: Keyboard Shortcut === */
.kbd-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.1);
}

/* === Components: Buttons === */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--accent-primary);
  transition: all var(--transition-fast);
}

.btn-link:hover {
  color: var(--accent-primary-hover);
  transform: translateX(2px);
}

.btn-outline {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  color: var(--text-primary);
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border-color); /* 默认有边框 */
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-secondary); /* hover时边框更亮 */
  transform: translateY(-1px);
}

/* === Skeleton Loading === */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

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

.skeleton-card {
  padding: var(--space-5);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.skeleton-img {
  width: 120px;
  height: 140px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-title {
  height: 20px;
  width: 80%;
  margin: 0 auto 12px;
}

.skeleton-price {
  height: 24px;
  width: 40%;
  margin: 12px auto 0;
}
