:root {
  --primary-color: #ff0000;
  --bg-color: #ffffff; /* 순백색으로 변경 */
  --card-bg: #f8f9fa; /* 카드는 아주 연한 회색 */
  --text-color: #212529;
  --input-bg: #ffffff;
  --input-border: #ced4da;
  --placeholder-color: #adb5bd;
  --border-radius: 12px;
  color-scheme: light; /* 브라우저에 라이트 모드임을 알림 */
}

[data-theme="dark"] {
  --bg-color: #000000; /* 완전 검정 */
  --card-bg: #1a1a1a; /* 짙은 회색 카드 */
  --text-color: #f8f9fa;
  --input-bg: #2b2b2b;
  --input-border: #444444;
  --placeholder-color: #6c757d;
  color-scheme: dark; /* 브라우저에 다크 모드임을 알림 */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 550px;
  text-align: center;
  position: relative;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .container {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.theme-switch-wrapper {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.theme-toggle-btn {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: inline-block; }

h1 {
  margin-top: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

p {
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 2rem;
}

input[type="text"] {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 2px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-color);
  border-radius: var(--border-radius);
  outline: none;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
}

button#get-thumbnail {
  padding: 0.8rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button#get-thumbnail:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.thumbnail-container {
  margin-top: 1rem;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--input-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.thumbnail-image {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.download-btn {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.download-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.placeholder-text {
  color: var(--placeholder-color);
}
