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

:root {
  --bg-color: #0d0f12;
  --panel-bg: #161a22;
  --panel-border: #232a36;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent-crimson: #c81e1e;
  --accent-gold: #e5c158;
  --gold-glow: rgba(229, 193, 88, 0.15);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', 'Noto Serif KR', sans-serif;
  line-height: 1.6;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* Mobile-first layout container */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-color);
  border-left: 1px solid var(--panel-border);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Header style */
header {
  padding: 24px 20px;
  background: linear-gradient(180deg, rgba(22, 26, 34, 0.8) 0%, rgba(13, 15, 18, 0) 100%);
  border-bottom: 1px solid rgba(35, 42, 54, 0.3);
  text-align: center;
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  z-index: 10;
}

header h1 {
  font-family: 'Noto Serif KR', serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 2px;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Timeline Container */
.timeline-section {
  flex-grow: 1;
  padding: 24px 20px 40px 20px;
  position: relative;
}

/* Timeline vertical line */
.timeline-section::before {
  content: '';
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 36px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-crimson) 0%, var(--accent-gold) 50%, var(--panel-border) 100%);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  list-style: none;
}

/* Timeline Card Item */
.timeline-item {
  display: flex;
  position: relative;
  cursor: pointer;
  outline: none;
}

/* Timeline point dot */
.timeline-badge {
  width: 32px;
  height: 32px;
  background-color: var(--panel-bg);
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  position: absolute;
  left: 17px;
  top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Noto Serif KR', serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent-gold);
  box-shadow: 0 0 10px var(--gold-glow);
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .timeline-badge {
  background-color: var(--accent-gold);
  color: var(--bg-color);
  box-shadow: 0 0 15px var(--accent-gold);
  transform: scale(1.1);
}

/* Card body styling */
.timeline-card {
  margin-left: 64px;
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px;
  width: calc(100% - 64px);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .timeline-card {
  border-color: rgba(229, 193, 88, 0.4);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(229, 193, 88, 0.05);
  transform: translateY(-2px);
}

.timeline-card h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-card h3::after {
  content: '→';
  font-size: 0.9rem;
  color: var(--accent-gold);
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-card h3::after {
  opacity: 1;
  transform: translateX(0);
}

.timeline-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Detail page styling */
.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--panel-border);
}

.btn-back {
  background: none;
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background-color: var(--panel-bg);
  border-color: var(--text-secondary);
}

.detail-content {
  flex-grow: 1;
  padding: 32px 24px;
}

.ep-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.ep-badge {
  background-color: rgba(229, 193, 88, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 193, 88, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ep-file {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.detail-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 24px;
  line-height: 1.3;
  color: var(--text-primary);
  border-left: 4px solid var(--accent-crimson);
  padding-left: 12px;
}

.detail-summary {
  font-size: 1rem;
  color: var(--text-primary);
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  white-space: pre-wrap;
}

/* Feedback panel footer */
.feedback-panel {
  border-top: 1px solid var(--panel-border);
  padding: 24px 20px;
  background-color: rgba(22, 26, 34, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-panel h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.btn-group {
  display: flex;
  gap: 12px;
}

.btn-action {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-crimson {
  background-color: rgba(200, 30, 30, 0.1);
  border: 1px solid rgba(200, 30, 30, 0.4);
  color: #ff8888;
}

.btn-crimson:hover {
  background-color: rgba(200, 30, 30, 0.2);
  border-color: rgba(200, 30, 30, 0.6);
}

.btn-gold {
  background-color: rgba(229, 193, 88, 0.1);
  border: 1px solid rgba(229, 193, 88, 0.4);
  color: var(--accent-gold);
}

.btn-gold:hover {
  background-color: rgba(229, 193, 88, 0.2);
  border-color: rgba(229, 193, 88, 0.6);
}

.toast {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1f2937;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 100;
}

.toast.show {
  opacity: 1;
}
