/* ============================================================
   common.css — negeulja 다크 테마 공통 CSS
   index.html, daily.html, gunghap.html에서 공유
   ============================================================ */

@import './colors.css';

/* ============================================================
   CSS Variables (다크 테마)
   ============================================================ */
:root {
  --bg-dark: #1C1C1C;
  --bg-beige: #E8DCC8;
  --gold: #C4973B;
  --gold-hover: #D4A74B;
  --white: #FFFEF9;
  --sub-text: #999999;
  --card-bg: rgba(232,220,200,0.08);
  --card-border: rgba(196,151,59,0.2);
  --wood: #2D5F2D;
  --fire: #C23B22;
  --earth: #A0875B;
  --metal: #8C8C8C;
  --water: #2C4A6E;
}

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

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   Typography
   ============================================================ */
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--white);
  background: var(--bg-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.serif {
  font-family: 'Noto Serif KR', 'Batang', 'Georgia', serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, select {
  font-family: inherit;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--white);
}

.section-beige {
  background: var(--bg-beige);
  color: #2A2A2A;
}

section {
  padding: 48px 16px;
}

/* ============================================================
   Section Titles
   ============================================================ */
.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-title h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-title .hanja-accent {
  font-family: 'Noto Serif KR', 'Batang', 'Georgia', serif;
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 4px;
}

.section-beige .section-title h2 {
  color: #2A2A2A;
}

.section-beige .section-title .hanja-accent {
  color: #8B7340;
}

/* ============================================================
   Navigation — page-nav (daily, gunghap 공통)
   ============================================================ */
.page-nav {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(196,151,59,0.15);
}

.page-nav a {
  font-size: 14px;
  color: var(--sub-text);
  transition: color 0.2s;
}

.page-nav a:hover {
  color: var(--gold);
}

.page-nav-logo {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin-left: auto;
}

/* ============================================================
   Form Components
   ============================================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub-text);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--white);
  font-size: 15px;
  transition: border-color 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus {
  border-color: var(--gold);
  outline: none;
}

.form-group input[type="text"]:disabled,
.form-group input[type="date"]:disabled,
.form-group select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-group input[type="date"] {
  color-scheme: dark;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '\25BC';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sub-text);
  font-size: 10px;
  pointer-events: none;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

.checkbox-row label {
  font-size: 13px;
  color: var(--sub-text);
  margin-bottom: 0;
  cursor: pointer;
}

.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 15px;
  color: var(--white);
}

.radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

.form-error {
  color: var(--fire);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.form-error.show {
  display: block;
}

.mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--bg-dark);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 6px;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  letter-spacing: 0.5px;
}

.btn-gold:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(196,151,59,0.35);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--bg-dark);
}

.btn-submit {
  width: 100%;
  margin-top: 8px;
  font-size: 17px;
  padding: 15px;
  border-radius: 8px;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-up-delay-4 { animation-delay: 0.4s; opacity: 0; }
.fade-in-up-delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ============================================================
   Responsive (공통)
   ============================================================ */
@media (min-width: 600px) {
  section {
    padding: 80px 24px;
  }
}

@media (min-width: 900px) {
  .section-title h2 {
    font-size: 36px;
  }
  section {
    padding: 100px 32px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}
