/* =============================================
   🎬 MovieLog - Watcha-inspired Dark Theme
   ============================================= */

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

:root {
  --bg-primary: #0D0D0F;
  --bg-secondary: #1A1A1E;
  --bg-card: #222228;
  --bg-card-hover: #2A2A32;
  --bg-input: #2C2C34;
  --accent: #FF0558;
  --accent-hover: #E0004D;
  --accent-light: rgba(255, 5, 88, 0.15);
  --text-primary: #F5F5F5;
  --text-secondary: #C0C0C8;
  --text-muted: #9090A0;
  --border: #333340;
  --star-filled: #FF0558;
  --star-empty: #444450;
  --success: #00C853;
  --warning: #FFD600;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

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

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(13, 13, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 1000;
}

.navbar-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.navbar-menu {
  display: flex;
  gap: 8px;
  list-style: none;
}

.navbar-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--text-primary);
  background: var(--accent-light);
}

.navbar-menu a.active {
  color: var(--accent);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-user .nickname {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.btn-change-pw {
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-change-pw:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.btn-logout {
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-logout:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* --- Main Container --- */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 24px 48px;
}

/* --- Auth Page --- */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow);
}

.auth-card .logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-toggle {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-toggle a {
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

.auth-error {
  background: rgba(255, 5, 88, 0.1);
  border: 1px solid rgba(255, 5, 88, 0.3);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Movie Grid --- */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.movie-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.movie-card .poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg-input);
}

.movie-card .poster-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
}

.movie-card .info {
  padding: 12px 14px 16px;
}

.movie-card .title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.movie-card .rating-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--accent);
  font-weight: 600;
}

.movie-card .rating-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--accent);
}

/* (my-rating class replaced by .badges system above) */

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 24px;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 24px 0;
}

.modal-poster {
  width: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.modal-poster img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.modal-title-area {
  flex: 1;
}

.modal-title-area h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-title-area .overview {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-title-area .genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.genre-tag {
  padding: 4px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--bg-input);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

/* --- Slider Rating (10점 만점) --- */
.rating-slider-wrap {
  margin-bottom: 20px;
}

.rating-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.rating-display .rating-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.rating-display .rating-max {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.rating-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input);
  outline: none;
  cursor: pointer;
}

.rating-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent) var(--fill, 0%), var(--bg-input) var(--fill, 0%));
}

.rating-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--accent);
  margin-top: -8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.rating-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.rating-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input);
}

.rating-slider::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
}

.rating-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--accent);
  cursor: pointer;
}

.rating-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.rating-label span {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

/* --- TMDB Rating (초록색) --- */
.tmdb-rating-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #00E676;
  font-weight: 600;
}

.tmdb-rating-badge svg {
  width: 14px;
  height: 14px;
  fill: #00E676;
}

/* My rating badge on card (핑크) */
.movie-card .badges {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.movie-card .badge-my {
  background: rgba(255, 5, 88, 0.9);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.movie-card .badge-tmdb {
  background: rgba(0, 230, 118, 0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.movie-card .badge-lang {
  background: rgba(160, 160, 168, 0.6);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- (old recommend-layout removed) --- */

/* --- EQ Panel (Mixer Style) --- */
.eq-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.eq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.eq-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.eq-reset-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.eq-reset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Mixer: horizontal row of vertical channels */
.eq-mixer {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 24px;
  overflow: visible;
  padding: 8px 0;
}

.eq-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 56px;
}

.eq-ch-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 28px;
  text-align: center;
}

.eq-slider-track {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Vertical slider via writing-mode */
.eq-vslider {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 6px;
  height: 130px;
  background: var(--bg-input);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.eq-vslider::-webkit-slider-runnable-track {
  width: 6px;
  background: var(--bg-input);
  border-radius: 3px;
}

.eq-vslider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 3px rgba(255, 5, 88, 0.4);
  transition: transform 0.15s;
}

.eq-vslider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.eq-vslider::-moz-range-track {
  width: 6px;
  background: var(--bg-input);
  border-radius: 3px;
}

.eq-vslider::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* Direction labels (top/bottom of slider) */
.eq-dir-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: -0.3px;
}

.eq-dir-top {
  margin-bottom: -2px;
}

.eq-dir-bot {
  margin-top: -2px;
}

.eq-ch-name {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}

/* Tooltip on hover */
.eq-channel {
  position: relative;
}

.eq-channel::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  width: 200px;
  text-align: left;
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
}

.eq-channel:hover::after {
  opacity: 1;
  visibility: visible;
}

.eq-panel .btn-recommend {
  width: 100%;
  margin-top: 4px;
}

/* --- Recommend Result Cards (3편 나란히) --- */
.recommend-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rec-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.rec-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.rec-card .rec-poster {
  width: 100%;
}

.rec-card .rec-poster img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.rec-card .rec-poster .poster-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  font-size: 2rem;
}

.rec-card .rec-body {
  padding: 14px;
  flex: 1;
  min-width: 0;
}

.rec-card .rec-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rec-card .rec-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.rec-card .rec-reason {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rec-card .rec-genres {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.rec-card .rec-genres .genre-tag {
  font-size: 0.68rem;
  padding: 2px 7px;
}

@media (max-width: 768px) {
  .recommend-cards {
    grid-template-columns: 1fr;
  }
  .eq-mixer {
    gap: 8px;
  }
  .eq-slider-track {
    height: 100px;
  }
  .eq-vslider {
    height: 90px;
  }
}

/* --- Taste Analysis Page --- */
.taste-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.taste-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
}

.taste-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.taste-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taste-stat-unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.taste-stat-sub {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 4px;
}

.taste-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.taste-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* 장르 차트 */
.taste-genre-chart {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.taste-genre-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.taste-genre-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.taste-genre-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.taste-genre-stats {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.taste-genre-bar-bg {
  background: var(--bg-input);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.taste-genre-bar {
  background: var(--accent);
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* 평점 분포 */
.taste-rating-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding-top: 20px;
}

.taste-rating-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.taste-rating-bar-container {
  width: 100%;
  height: 120px;
  background: var(--bg-input);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.taste-rating-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  min-height: 2px;
}

.taste-rating-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.taste-rating-count {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* 감독/배우 */
.taste-credits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .taste-credits-grid { grid-template-columns: 1fr; }
}

.taste-credit-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.taste-credit-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.taste-credit-photo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.taste-credit-info {
  overflow: hidden;
}

.taste-credit-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taste-credit-meta {
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 2px;
}

.taste-credit-movies {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 키워드 */
.taste-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.taste-keyword {
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 20px;
  color: var(--text-primary);
  display: inline-block;
  transition: transform 0.15s;
}

.taste-keyword:hover {
  transform: scale(1.05);
}

.taste-keyword sup {
  font-size: 0.6em;
  color: var(--accent);
  margin-left: 2px;
}

/* 타임라인 */
.taste-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.taste-timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.taste-timeline-month {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-width: 60px;
  text-align: right;
}

.taste-timeline-bar-bg {
  flex: 1;
  background: var(--bg-input);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.taste-timeline-bar {
  background: var(--accent);
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.taste-timeline-stats {
  font-size: 0.78rem;
  color: var(--text-secondary);
  min-width: 90px;
}

/* --- Textarea --- */
textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}

textarea:focus {
  border-color: var(--accent);
}

textarea::placeholder {
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn-primary {
  flex: 1;
}

.btn-secondary {
  padding: 12px 20px;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-danger {
  padding: 12px 20px;
  background: rgba(255, 50, 50, 0.15);
  color: #FF5252;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-danger:hover {
  background: rgba(255, 50, 50, 0.25);
}

/* --- Search Bar --- */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.search-bar input {
  flex: 1;
  padding: 12px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-bar input:focus {
  border-color: var(--accent);
}

.search-bar button {
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition);
  white-space: nowrap;
}

.search-bar button:hover {
  background: var(--accent-hover);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 360px;
  margin: 0 auto;
}

/* --- Recommendation Page --- */
.recommend-hero {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(255, 5, 88, 0.1), rgba(255, 5, 88, 0.02));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.recommend-hero h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.recommend-hero p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.btn-recommend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.btn-recommend:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 5, 88, 0.3);
}

.btn-recommend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.recommend-result {
  display: none;
  padding: 24px 0 0;
  margin-top: 24px;
  text-align: left;
}

.recommend-result.show {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.recommend-movie {
  display: flex;
  gap: 24px;
}

.recommend-movie .poster-area {
  width: 200px;
  flex-shrink: 0;
}

.recommend-movie .poster-area img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.recommend-movie .detail-area {
  flex: 1;
}

.recommend-movie .detail-area h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.recommend-movie .reason {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.recommend-movie .reason strong {
  color: var(--accent);
}

/* --- Month Navigation --- */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.month-year-label {
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 80px;
  text-align: center;
}

.month-arrow {
  width: 36px;
  height: 36px;
  background: var(--bg-input);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
}

.month-arrow:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.month-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

.month-tab {
  padding: 8px 16px;
  background: var(--bg-input);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}

.month-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.month-tab.active {
  background: var(--accent);
  color: #fff;
}

.month-tab.past {
  opacity: 0.5;
}

.month-tab.past.active {
  opacity: 1;
}

/* --- Credits Section --- */
.credits-section {
  margin-top: 20px;
}

.credits-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.credits-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.credit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  min-width: fit-content;
  flex-shrink: 0;
}

.credit-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.credit-photo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.credit-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.credit-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

/* --- OTT Section --- */
.ott-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.ott-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.ott-group {
  margin-bottom: 16px;
}

.ott-group:last-of-type {
  margin-bottom: 0;
}

.ott-group-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.ott-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ott-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  min-width: 180px;
}

.ott-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.ott-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.ott-price {
  font-size: 0.75rem;
  font-weight: 600;
  color: #00E676;
  background: rgba(0, 230, 118, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.ott-price.rent {
  color: #FFD600;
  background: rgba(255, 214, 0, 0.1);
}

.ott-price.buy {
  color: #FF9100;
  background: rgba(255, 145, 0, 0.1);
}

.ott-detail-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  transition: opacity var(--transition);
}

.ott-detail-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- Loading Spinner --- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.loading-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
  color: var(--text-secondary);
}

.loading-section .spinner {
  width: 36px;
  height: 36px;
  border-width: 3px;
  border-color: var(--border);
  border-top-color: var(--accent);
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 3000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--accent);
}

/* --- Review Modal Blog Style --- */
.review-modal {
  max-width: 780px;
  overflow-y: auto;
}

.review-hero {
  position: relative;
  overflow: hidden;
}

.review-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.3);
  transform: scale(1.2);
}

.review-hero-content {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 28px 24px 24px;
}

.review-hero-poster {
  flex-shrink: 0;
  width: 120px;
}

.review-hero-poster img {
  width: 100%;
  border-radius: var(--radius-sm);
  aspect-ratio: 2/3;
  object-fit: cover;
}

.review-hero-info {
  flex: 1;
  min-width: 0;
}

.review-hero-info h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.review-hero-info .overview {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read Mode */
.review-read-body {
  padding: 28px 36px 16px;
}

.review-read-dates {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.review-read-rating {
  text-align: center;
  margin-bottom: 24px;
}

.review-read-score {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.review-read-max {
  font-size: 1rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.review-read-oneliner {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 14px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.6;
}

.review-read-text {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 24px;
  padding: 0 4px;
}

.review-read-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.review-read-actions {
  display: flex;
  gap: 10px;
  padding: 0 36px 28px;
}

.review-read-actions .btn-primary {
  flex: 1;
}

/* Edit Mode inside review modal */
.review-edit-mode .modal-body {
  padding: 24px 36px 28px;
}

.edit-date-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.edit-date-icon {
  font-size: 1rem;
}

.edit-date-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.edit-date-input {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  color-scheme: dark;
  transition: border-color var(--transition);
}

.edit-date-input:focus {
  border-color: var(--accent);
}

.edit-date-today {
  padding: 5px 12px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  transition: all var(--transition);
}

.edit-date-today:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Filter/Sort Bar --- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-bar select {
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.review-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.review-count span {
  color: var(--accent);
  font-weight: 700;
}

/* --- Animations --- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

.fade-in {
  animation: fadeIn 0.4s ease;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
  }

  .navbar-menu a {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .navbar-menu a span.label {
    display: none;
  }

  .main-container {
    padding: 80px 16px 32px;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .modal-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .modal-poster {
    width: 160px;
  }

  .recommend-movie {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .recommend-movie .poster-area {
    width: 160px;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .search-bar {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }
}
