/* myapp/seti/style.css */

:root {
  /* Apple iOS Dark Mode Color Tokens */
  --color-bg: #000000;
  --color-surface: rgba(28, 28, 30, 0.75);
  --color-surface-active: rgba(44, 44, 46, 0.9);
  --color-accent: #0A84FF;
  --color-border: rgba(255, 255, 255, 0.08);
  
  --text-primary: #FFFFFF;
  --text-secondary: rgba(235, 235, 245, 0.6);
  --text-tertiary: rgba(235, 235, 245, 0.3);

  /* Layout & Curves */
  --radius-ios-card: 20px;
  --ease-ios: cubic-bezier(0.25, 1, 0.5, 1);
  --shadow-ios: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

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

body {
  background-color: var(--color-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Pretendard Variable", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior-y: none;
  -webkit-touch-callout: none;
  -webkit-font-smoothing: antialiased;
}

.app-header {
  margin-top: 20px;
  margin-bottom: 2vh;
  text-align: center;
  width: 100%;
}

.app-main-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.game-title-input {
  font-size: 4vh;
  line-height: 1.1;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

#container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  min-height: 60vh;
}

/* 스캐너 컨테이너 */
.scanner-area {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 340px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-ios);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all 0.3s var(--ease-ios);
}

/* 평상시 중앙 버튼 */
.scan-btn {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(10, 132, 255, 0.15);
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(10, 132, 255, 0.3);
  transition: transform 0.2s var(--ease-ios), background 0.2s;
}

.scan-btn:active {
  transform: scale(0.9);
  background: rgba(10, 132, 255, 0.3);
}

.scan-btn svg {
  width: 32px;
  height: 32px;
}

/* 스캐닝 레이더 효과 */
.radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 70%, rgba(10, 132, 255, 0.8) 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.scanner-area.scanning .radar-sweep {
  opacity: 1;
  animation: radar-spin 1s linear infinite;
}

.scanner-area.scanning .scan-btn {
  transform: scale(0.7);
  opacity: 0;
  pointer-events: none;
}

@keyframes radar-spin {
  to { transform: rotate(360deg); }
}

/* 결과 카드 */
.result-card {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  opacity: 0;
  transform: scale(0.8);
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-ios), transform 0.5s var(--ease-ios);
}

.result-card.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  cursor: pointer;
}

.race-name {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.race-eng {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.race-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 80%;
  word-break: keep-all;
}

/* 리셋 (결과 닫기) 안내 텍스트 */
.reset-hint {
  position: absolute;
  bottom: 20px;
  font-size: 12px;
  color: var(--text-tertiary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}
