@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --primary: #1E3A8A; /* Navy/Blue core */
  --primary-glow: rgba(30, 58, 138, 0.4); /* Stronger blue shadow */
  --bg-dark: #F1F5F9; /* Slightly darker background for better contrast with white cards */
  --bg-card: #FFFFFF; /* Pure white card */
  --bg-card-hover: #E2E8F0;
  --text-main: #1E293B; /* Dark typography for readability */
  --text-muted: #64748B;
  --accent: #2563EB; /* Vibrant Blue accent */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-container {
  width: 100%;
  max-width: 600px; /* 모바일 중심 레이아웃 */
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-dark);
}

/* Intro Screen */
.intro-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  padding: 20px;
  background: radial-gradient(circle at center, #E0F2FE 0%, var(--bg-dark) 100%);
}

.intro-screen h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.intro-screen p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.timer-box {
  background: var(--bg-card);
  padding: 20px 30px;
  border-radius: 16px;
  margin-bottom: 40px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* Stronger shadow */
  border: 1px solid rgba(0,0,0,0.05);
}

.timer-box h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-display {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  /* Removed neon glow text-shadow entirely */
}

.btn-primary {
  background: var(--primary);
  color: white; /* Still white to contrast against navy primary */
  border: none;
  padding: 16px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px var(--primary-glow); /* Deeper shadow */
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px var(--primary-glow);
  background: #2563EB; /* Lighter blue on hover */
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px var(--primary-glow);
}

/* Custom Dialog Styles */
.dialog-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.7); /* Lighter backdrop */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

.dialog-box {
  background: var(--bg-card);
  padding: 30px 25px;
  border-radius: 20px;
  width: 85%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2), inset 0 0 10px rgba(0,0,0,0.02); /* Stronger dialog shadow */
  border: 1px solid rgba(0,0,0,0.05);
  animation: slideUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.dialog-box h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.dialog-box p {
  color: var(--text-main);
  margin-bottom: 25px;
  font-size: 1rem;
  line-height: 1.5;
  word-break: keep-all;
  white-space: pre-wrap; /* 줄바꿈 유지 */
}

.dialog-input {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.2); /* Adjusted border for light mode */
  background: rgba(255,255,255,0.9);
  color: var(--text-main);
  margin-bottom: 25px;
  font-size: 1.1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.dialog-input:focus {
  border-color: var(--primary);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 0 8px var(--primary-glow);
}

.dialog-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.dialog-buttons button {
  flex: 1;
  padding: 12px 0;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-confirm {
  background: var(--primary);
  color: white;
  box-shadow: 0 6px 15px var(--primary-glow);
}
.btn-confirm:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px var(--primary-glow);
}

.btn-cancel {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(0,0,0,0.2) !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.btn-cancel:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-main);
}

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

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

/* Loading Spinners & Bars */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(37, 99, 235, 0.1);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

.spinner-large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

.loading-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

.loading-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

/* Pulse animation for uploading text */
@keyframes pulse-text {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.pulse-text {
  animation: pulse-text 0.8s infinite alternate;
}

.image-loader-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-card-hover);
}

