/* CoffeeNewsBite - 커피 한 잔 전에 끝나는 뉴스 */

:root {
  --coffee-dark: #6B4423;
  --coffee-medium: #8B6F47;
  --coffee-light: #C8A882;
  --cream: #F5F0E8;
  --white: #FFFFFF;
  --text-dark: #3E2723;
  --text-gray: #666666;
  --shadow: rgba(107, 68, 35, 0.15);
  
  /* 다크 모드용 고정 색상 및 배경용 브랜드 색상 */
  --white-fixed: #FFFFFF;
  --coffee-bg-dark: #6B4423;
  --coffee-bg-medium: #8B6F47;
  --hover-bg: #FAF6EF;
  --title-color: #6B4423;
  
  /* 접근성 개선 - 더 나은 대비율 */
  --focus-ring: rgba(107, 68, 35, 0.25);
  --border-color: #E0E0E0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  background-color: var(--white);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 스크롤바 스타일링 (Webkit) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--coffee-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--coffee-medium);
}

/* 컨테이너 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 히어로 섹션 */
.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
  color: #FFFFFF;
  margin-bottom: 40px;
  padding: 20px;
}

/* 페이지별 히어로 배경 이미지 */
.hero-bg-home {
  background-image: url('../images/hero_bg.jpg');
}

.hero-bg-news {
  background-image: url('../images/hero_bg.jpg');
}

.hero-bg-knowledge {
  background-image: url('../images/hero_bg_insight.jpg');
}

.hero-bg-topics {
  background-image: url('../images/hero_bg_pick.jpg');
}

.hero-content {
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out;
}

.hero-content h2 {
  color: #633f27;
}

.hero-title {
  font-size: clamp(2.5em, 6vw, 4em);
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: none;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1.1em, 3vw, 1.5em);
  font-weight: 300;
  opacity: 0.95;
  margin-bottom: 0;
  text-shadow: none;
  color: #633f27;
}

.hero-btn {
  margin-top: 25px;
  padding: 12px 28px;
  background-color: #cf8e44;
  border: 2px solid #cf8e44;
  color: #FFFFFF;
  font-size: 1.1em;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.hero-btn:hover {
  background-color: #FFFFFF;
  color: var(--coffee-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

/* 헤더 */
.header {
  background: var(--white);
  color: var(--coffee-dark);
  padding: 10px 20px 30px;
  text-align: center;
  border-radius: 0;
  margin-bottom: 40px;
  box-shadow: none;
  transition: all 0.3s ease;
}

.header:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(107, 68, 35, 0.15);
  background-color: var(--hover-bg);
}

.header h1 {
  font-size: clamp(2em, 5vw, 3em);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.header-logo-icon {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  margin-bottom: 0.1em;
}

.header-mobile-logo {
  display: none;
  height: 2.5em;
  width: auto;
  vertical-align: middle;
}

.section-icon {
  height: 1.1em;
  width: auto;
  vertical-align: middle;
  margin-bottom: 0.15em;
  margin-right: 5px;
}

.header .subtitle {
  font-size: clamp(1em, 3vw, 1.3em);
  color: var(--coffee-medium);
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* 상단 메뉴 */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 20px;
  margin-bottom: 0;
  border-radius: 0;
  border-bottom: none;
  box-shadow: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: box-shadow 0.3s ease;
}

.top-nav.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-logo-link {
  display: flex;
  align-items: center;
  transition: opacity 0.3s;
}

.nav-logo-link:hover {
  opacity: 0.8;
}

.nav-logo {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--coffee-dark);
  font-weight: 700;
  font-size: 1.05em;
  padding: 10px 20px;
  border-radius: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover {
  background: var(--hover-bg);
  transform: translateY(-1px);
}

.nav-links a.active {
  background: var(--coffee-bg-dark);
  color: var(--white-fixed);
  box-shadow: 0 2px 8px rgba(107, 68, 35, 0.2);
}

.nav-links a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 날짜 선택 네비게이션 */
.date-nav {
  background: #FAFAFA;
  padding: 20px 25px;
  border-radius: 15px;
  margin-bottom: 35px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.date-nav label {
  font-weight: 600;
  color: var(--coffee-dark);
  font-size: 1.05em;
}

.date-nav select {
  min-width: 200px;
  padding: 12px 45px 12px 18px;
  border: 2px solid var(--coffee-light);
  border-radius: 10px;
  font-size: 1em;
  font-family: inherit;
  background-color: var(--white);
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.25s ease;
  
  /* 커스텀 화살표 (브라우저 기본 스타일 제거) */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238B6F47' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.date-nav select:hover {
  border-color: var(--coffee-medium);
  box-shadow: 0 4px 8px rgba(107, 68, 35, 0.12);
}

.date-nav select:focus {
  outline: none;
  border-color: var(--coffee-dark);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-form {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex: 1;
  max-width: 400px;
}

.search-form input {
  padding: 12px 18px;
  border: 2px solid var(--coffee-light);
  border-radius: 10px;
  font-size: 1em;
  background: var(--white);
  color: var(--text-dark);
  flex: 1;
  min-width: 0;
  transition: all 0.25s;
}

.search-form input::placeholder {
  color: var(--text-gray);
  opacity: 0.7;
}

.search-form input:focus {
  outline: none;
  border-color: var(--coffee-dark);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-form button {
  padding: 12px 24px;
  background: var(--coffee-bg-dark);
  color: var(--white-fixed);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  min-height: 44px;
}

.search-form button:hover {
  background: var(--coffee-bg-medium);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(107, 68, 35, 0.2);
}

.search-form button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.search-form button:active {
  transform: translateY(0);
}

.category-filters {
  display: none; /* 기본적으로 접힌 상태 */
  justify-content: center;
  gap: 12px;
  margin-bottom: 35px;
  flex-wrap: wrap;
}

.category-filters.show {
  display: flex; /* 펼쳤을 때 보임 (데스크탑: flex) */
}

.filter-btn {
  padding: 12px 24px;
  border: 2px solid var(--coffee-light);
  background: var(--white);
  color: var(--coffee-dark);
  border-radius: 25px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  min-height: 44px;
  font-size: 1em;
}

.filter-btn:hover {
  background: var(--hover-bg);
  border-color: var(--coffee-medium);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--coffee-bg-dark);
  color: var(--white-fixed);
  border-color: var(--coffee-bg-dark);
  box-shadow: 0 3px 10px rgba(107, 68, 35, 0.2);
}

.filter-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 뉴스 그리드 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
  justify-content: center; /* 카드가 적을 때 중앙 정렬 */
}

/* 카테고리 섹션 스타일 */
.category-section {
  margin-bottom: 50px;
}

.category-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--cream);
}

.category-section-title {
  font-size: 1.6em;
  font-weight: 800;
  color: var(--coffee-dark);
  display: flex;
  align-items: center;
}

.search-results-header {
  grid-column: 1 / -1;
  color: var(--coffee-dark);
  margin-bottom: -5px;
  font-size: 1.2em;
}

/* 모바일 카테고리 토글 버튼 */
.category-toggle-btn {
  display: flex; /* 데스크탑에서도 표시 */
  width: 100%;
  padding: 15px 20px;
  background: var(--white);
  border: 2px solid var(--coffee-light);
  border-radius: 12px;
  color: var(--coffee-dark);
  font-weight: 700;
  font-size: 1em;
  margin-bottom: 15px;
  cursor: pointer;
  text-align: left;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.news-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--coffee-medium);
}

/* 라이프/트렌드 카드 특별 스타일 (강조) */
.news-card.card-category-trend {
  background-color: #FFFBF0; /* 아주 연한 웜톤 배경 */
  border: 2px solid #E67E22; /* 오렌지색 테두리 */
  box-shadow: 0 6px 16px rgba(230, 126, 34, 0.12);
  background-color: #FFFCF9; /* 아주 연한 웜톤 배경 */
  border: 2px solid #D99E7B; /* 시나몬 톤 테두리 */
  box-shadow: 0 6px 16px rgba(217, 158, 123, 0.15);
}

.news-card.card-category-trend:hover {
  border-color: #D35400;
  box-shadow: 0 12px 28px rgba(211, 84, 0, 0.2);
  border-color: #BF7E58;
  box-shadow: 0 12px 28px rgba(191, 126, 88, 0.2);
}

.news-category {
  padding: 16px;
  font-weight: 700;
  color: var(--white-fixed);
  text-align: center;
  font-size: 1.05em;
  letter-spacing: 0.5px;
}

.category-politics {
  background: linear-gradient(135deg, #D4A373 0%, #B8956A 100%);
}

.category-society {
  background: linear-gradient(135deg, #A0826D 0%, #8B6F5C 100%);
}

.category-economy {
  background: linear-gradient(135deg, #C8A882 0%, #B89968 100%);
}

.category-tech {
  background: linear-gradient(135deg, #8D6E63 0%, #6D4C41 100%);
}

.category-trend {
  background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
  background: linear-gradient(135deg, #D99E7B 0%, #BF7E58 100%); /* 시나몬/살구빛 브라운 */
}

.category-money {
  background: linear-gradient(135deg, #27ae60 0%, #16a085 100%);
  background: linear-gradient(135deg, #9CA685 0%, #7E8A66 100%); /* 올리브/말차 그린 */
}

.news-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--cream);
  display: block;
}

.news-body {
  padding: 22px;
}

.news-title {
  font-size: 1.35em;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--title-color);
  line-height: 1.5;
}

.news-content {
  color: var(--text-gray);
  line-height: 1.75;
  margin-bottom: 18px;
  font-size: 0.98em;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.88em;
  color: var(--coffee-light);
  padding-top: 18px;
  border-top: 2px solid var(--cream);
}

/* 의견 섹션 */
.opinion-section {
  background: var(--white);
  border-radius: 20px;
  padding: 35px;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.topic-display {
  text-align: center;
  margin-bottom: 28px;
  padding: 22px;
  background: var(--cream);
  border-radius: 15px;
  border: 2px solid var(--coffee-light);
}

.topic-label {
  font-size: 0.92em;
  color: var(--coffee-medium);
  margin-bottom: 10px;
  font-weight: 600;
}

.topic-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.current-topic {
  font-size: 1.4em;
  color: var(--coffee-dark);
  font-weight: 700;
  line-height: 1.4;
}

.vote-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.vote-btn {
  flex: 1;
  max-width: 200px;
  padding: 16px;
  border: 2px solid #ddd;
  border-radius: 12px;
  background: var(--white);
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-gray);
  min-height: 50px;
}

/* 의견 필터 칩 */
.opinion-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.filter-chip {
  padding: 8px 16px;
  border: 1px solid var(--coffee-light);
  background: var(--white);
  color: var(--text-gray);
  border-radius: 20px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover {
  background: var(--cream);
}

.filter-chip.active {
  background: var(--coffee-medium);
  color: var(--white-fixed);
  border-color: var(--coffee-medium);
  font-weight: 700;
}

.vote-btn:hover {
  transform: translateY(-2px);
}

.vote-btn.agree:hover { 
  border-color: #27ae60; 
  color: #27ae60;
  background: rgba(39, 174, 96, 0.05);
}

.vote-btn.disagree:hover { 
  border-color: #c0392b; 
  color: #c0392b;
  background: rgba(192, 57, 43, 0.05);
}

.vote-btn.agree.selected {
  background: #27ae60;
  border-color: #27ae60;
  color: var(--white-fixed);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
  transform: translateY(-2px);
}

.vote-btn.disagree.selected {
  background: #c0392b;
  border-color: #c0392b;
  color: var(--white-fixed);
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
  transform: translateY(-2px);
}

.vote-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.opinion-section h2 {
  color: var(--coffee-dark);
  margin-bottom: 28px;
  font-size: 1.9em;
  font-weight: 700;
  line-height: 1.3;
}

.opinion-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 40px;
}

.opinion-form input,
.opinion-form textarea {
  padding: 15px 18px;
  border: 2px solid var(--coffee-light);
  border-radius: 12px;
  font-size: 1em;
  font-family: inherit;
  background: var(--cream);
  color: var(--text-dark);
  transition: all 0.25s;
}

.opinion-form input::placeholder,
.opinion-form textarea::placeholder {
  color: var(--text-gray);
  opacity: 0.7;
}

.opinion-form input:focus,
.opinion-form textarea:focus {
  outline: none;
  border-color: var(--coffee-dark);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.opinion-form textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.char-counter {
  text-align: right;
  font-size: 0.92em;
  color: var(--coffee-medium);
  margin-top: -8px;
}

.submit-btn {
  background: linear-gradient(135deg, var(--coffee-bg-dark) 0%, var(--coffee-bg-medium) 100%);
  color: var(--white-fixed);
  border: none;
  padding: 16px 40px;
  border-radius: 12px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px var(--shadow);
  min-height: 50px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

/* 의견 목록 */
.opinions-list {
  display: grid;
  gap: 18px;
}

.opinion-item {
  background: var(--cream);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid var(--coffee-medium);
  transition: all 0.25s;
}

.opinion-item:hover {
  border-left-color: var(--coffee-dark);
  background: var(--hover-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.opinion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.opinion-nickname {
  font-weight: 700;
  font-size: 0.95em;
  color: var(--coffee-dark);
  margin-right: auto; /* 닉네임을 왼쪽 정렬 유지 */
}

.vote-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 700;
  color: var(--white-fixed);
}

.vote-badge.agree { background: #27ae60; }
.vote-badge.disagree { background: #c0392b; }

.opinion-text {
  color: var(--text-dark);
  font-size: 1.05em;
  line-height: 1.6;
  word-wrap: break-word;
}

.opinion-date {
  font-size: 0.88em;
  color: var(--coffee-light);
}

/* 투표 통계 바 */
.vote-stats {
  margin-bottom: 22px;
}

.vote-bar {
  height: 12px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.vote-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
}

.vote-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.92em;
  font-weight: 700;
}

.vote-labels .agree { color: #27ae60; }
.vote-labels .disagree { color: #c0392b; }

/* 지난 토론 주제 목록 */
.topic-history-list {
  display: grid;
  gap: 15px;
}

.topic-history-item {
  background: var(--white);
  padding: 20px;
  border-radius: 15px;
  border: 2px solid var(--cream);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-history-item:hover {
  border-color: var(--coffee-light);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--shadow);
}

.topic-history-item:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.history-topic {
  display: block;
  font-weight: 700;
  color: var(--coffee-dark);
  margin-top: 5px;
  font-size: 1.1em;
  line-height: 1.4;
}

/* 구독 섹션 */
.subscribe-section {
  background: var(--white);
  color: var(--text-dark);
  padding: 45px 35px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid var(--coffee-dark);
  box-shadow: 0 4px 16px rgba(107, 68, 35, 0.1);
}

.subscribe-section h3 {
  margin-bottom: 15px;
  font-size: 1.9em;
  font-weight: 700;
  color: var(--coffee-dark);
  line-height: 1.3;
}

.subscribe-section p {
  margin-bottom: 28px;
  font-size: 1.08em;
  color: var(--text-gray);
  line-height: 1.6;
}

.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe-form input {
  flex: 1;
  min-width: 250px;
  padding: 15px 18px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 1em;
  background: #FAFAFA;
  color: var(--text-dark);
  transition: all 0.25s;
}

.subscribe-form input:focus {
  outline: none;
  border-color: var(--coffee-dark);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.subscribe-form button {
  padding: 15px 35px;
  background: var(--coffee-dark);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 50px;
  white-space: nowrap;
}

.subscribe-form button:hover {
  background: var(--coffee-medium);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 68, 35, 0.2);
}

.subscribe-form button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 로딩 및 메시지 */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--coffee-light);
  font-size: 1.15em;
}

.no-news {
  text-align: center;
  padding: 60px 20px;
  color: var(--coffee-medium);
  font-size: 1.25em;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 4px 12px var(--shadow);
}

/* 관리자 페이지 스타일 */
.admin-header {
  background: var(--white);
  color: var(--coffee-dark);
  padding: 35px 0;
  border-radius: 0;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  font-size: 2.3em;
  font-weight: 700;
  line-height: 1.2;
}

.logout-btn {
  background: var(--coffee-dark);
  color: var(--white);
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px;
}

.logout-btn:hover {
  background: var(--coffee-medium);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(107, 68, 35, 0.2);
}

.logout-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.login-section {
  background: var(--white);
  padding: 50px 35px;
  max-width: 480px;
  margin: 80px auto;
  border-radius: 20px;
  box-shadow: 0 8px 24px var(--shadow);
}

.login-section h2 {
  color: var(--coffee-dark);
  text-align: center;
  margin-bottom: 35px;
  font-size: 1.9em;
  line-height: 1.3;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form input {
  padding: 15px 18px;
  border: 2px solid var(--coffee-light);
  border-radius: 12px;
  font-size: 1.05em;
  background: var(--cream);
  color: var(--text-dark);
  transition: all 0.25s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--coffee-dark);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.login-btn {
  background: linear-gradient(135deg, var(--coffee-bg-dark) 0%, var(--coffee-bg-medium) 100%);
  color: var(--white-fixed);
  border: none;
  padding: 18px;
  border-radius: 12px;
  font-size: 1.15em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 54px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
}

.login-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 탭 */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 35px;
  border-bottom: 3px solid var(--cream);
  flex-wrap: wrap;
}

.tab {
  padding: 14px 26px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.05em;
  font-weight: 600;
  color: var(--coffee-light);
  border-bottom: 4px solid transparent;
  transition: all 0.25s;
  min-height: 44px;
}

.tab:hover {
  color: var(--coffee-medium);
  background: var(--hover-bg);
}

.tab.active {
  color: var(--coffee-dark);
  border-bottom-color: var(--coffee-dark);
}

.tab:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 폼 */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--coffee-dark);
  font-size: 1.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--coffee-light);
  border-radius: 12px;
  font-size: 1em;
  font-family: inherit;
  background: var(--cream);
  color: var(--text-dark);
  transition: all 0.25s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--coffee-dark);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-group textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.form-group select {
  cursor: pointer;
}

/* 이미지 업로드 */
.image-upload {
  border: 3px dashed var(--coffee-light);
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--cream);
}

.image-upload:hover {
  border-color: var(--coffee-medium);
  background: var(--hover-bg);
}

.image-upload:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.image-upload p {
  color: var(--coffee-dark);
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 8px;
}

.image-upload small {
  color: var(--coffee-light);
}

.image-preview {
  max-width: 400px;
  margin: 25px auto;
  display: none;
}

.image-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 4px 12px var(--shadow);
}

/* 뉴스 목록 (관리자) */
.news-list {
  display: grid;
  gap: 22px;
}

.news-item {
  background: var(--white);
  border: 2px solid var(--cream);
  border-radius: 15px;
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  transition: all 0.25s;
  position: relative;
}

.news-item:hover {
  border-color: var(--coffee-light);
  box-shadow: 0 4px 12px var(--shadow);
}

.news-item-image {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--cream);
}

.news-item-content {
  min-width: 0; /* 그리드 아이템 오버플로우 방지 */
  overflow-wrap: break-word; /* 긴 단어 줄바꿈 */
}

.news-item-content h3 {
  color: var(--coffee-dark);
  margin-bottom: 12px;
  font-size: 1.25em;
  line-height: 1.4;
}

.news-item-content p {
  color: var(--text-gray);
  line-height: 1.65;
}

.news-item-meta {
  color: var(--coffee-light);
  font-size: 0.92em;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid var(--cream);
}

.news-item-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.edit-btn, .delete-btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92em;
  transition: all 0.2s;
  min-height: 40px;
}

.edit-btn { 
  background: var(--coffee-light); 
  color: white; 
}

.delete-btn { 
  background: #e74c3c; 
  color: white; 
}

.edit-btn:hover, .delete-btn:hover { 
  opacity: 0.9; 
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* 임시 저장(Draft) 스타일 */
.news-card.draft {
  border: 2px dashed var(--coffee-light);
  opacity: 0.85;
  position: relative;
}

.news-card.draft::after {
  content: '임시저장';
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--text-gray);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
  z-index: 1;
}

.news-item.draft {
  border: 2px dashed var(--coffee-light);
  background-color: #fafafa;
}

.news-item.draft .news-item-content h3 {
  padding-right: 60px; /* 임시저장 배지와 겹치지 않도록 여백 추가 */
}

.news-item.draft::after {
  content: '임시저장';
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--text-gray);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
}

/* 예약 발행(Scheduled) 스타일 */
.news-item.scheduled {
  border: 2px solid #e67e22;
  background-color: #fffbf0;
}

.news-item.scheduled::after {
  content: '예약됨';
  position: absolute;
  top: 15px;
  right: 15px;
  background: #e67e22;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
}

/* 드래그 앤 드롭 스타일 */
.news-item.draggable {
  cursor: grab;
}

.news-item.draggable:active {
  cursor: grabbing;
}

.news-item.dragging {
  opacity: 0.5;
  border: 2px dashed var(--coffee-dark);
  background: var(--cream);
}

.news-item.drag-over {
  border-top: 3px solid var(--coffee-dark);
}

.edit-btn:focus-visible, .delete-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 44px;
  height: 44px;
  border: 2px solid var(--coffee-light);
  background: var(--white);
  color: var(--coffee-dark);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1em;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--coffee-dark);
  background: var(--cream);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--coffee-bg-dark);
  color: var(--white-fixed);
  border-color: var(--coffee-bg-dark);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 통계 카드 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 35px;
}

.stat-card {
  background: var(--white);
  color: var(--text-dark);
  padding: 25px;
  border-radius: 16px;
  text-align: left;
  box-shadow: 0 4px 20px rgba(107, 68, 35, 0.08);
  border: 1px solid rgba(200, 168, 130, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column-reverse; /* 라벨을 위로, 숫자를 아래로 배치 */
  justify-content: space-between;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(107, 68, 35, 0.15);
  border-color: var(--coffee-medium);
}

/* 카드 상단 장식 바 */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--coffee-medium), var(--coffee-light));
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-size: 3em;
  font-weight: 800;
  margin-top: 10px;
  margin-bottom: 0;
  line-height: 1;
  color: var(--coffee-dark);
  letter-spacing: -1px;
}

.stat-label {
  font-size: 0.95em;
  color: var(--text-gray);
  font-weight: 600;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--coffee-light);
}

/* 구독자 테이블 */
.subscriber-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow);
}

.subscriber-table th,
.subscriber-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 2px solid var(--cream);
}

.subscriber-table th {
  background: var(--coffee-bg-dark);
  color: var(--white-fixed);
  font-weight: 700;
  font-size: 1.02em;
}

.subscriber-table tr:hover {
  background: var(--cream);
}

.subscriber-table tr:last-child td {
  border-bottom: none;
}

/* 스켈레톤 UI (로딩 애니메이션) */
.skeleton {
  background: #f0f0f0;
  background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-category {
  height: 58px;
  border-radius: 0;
  margin-bottom: 0;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.skeleton-title {
  height: 32px;
  margin-bottom: 15px;
  width: 80%;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 10px;
}

.skeleton-meta {
  height: 24px;
  margin-top: 20px;
  width: 40%;
  border-top: none;
}

/* 모바일 네비게이션 */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  padding: 8px 0;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--coffee-light);
  font-size: 0.8em;
  transition: all 0.25s;
  padding: 8px 16px;
  border-radius: 12px;
  min-width: 64px;
  min-height: 48px;
}

.nav-item .nav-icon {
  font-size: 1.5em;
  margin-bottom: 4px;
}

.nav-item.active {
  color: var(--coffee-dark);
  font-weight: 700;
  background: var(--hover-bg);
}

.nav-item:hover {
  color: var(--coffee-medium);
  background: var(--hover-bg);
}

.nav-item:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .header {
    padding: 25px 15px;
    margin-bottom: 25px;
  }

  .header h1 {
    font-size: 1.8em;
    gap: 10px;
  }
  
  .header h1 .header-logo-icon {
    display: none;
  }
  
  .header-mobile-logo {
    display: inline-block;
  }
  
  .header-text {
    display: none;
  }

  .header .subtitle {
    font-size: 1em;
  }

  .top-nav {
    display: none;
  }

  .opinion-section, .subscribe-section {
    padding: 25px 18px;
  }

  .opinion-section h2, .subscribe-section h3 {
    font-size: 1.6em;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .news-item {
    grid-template-columns: 1fr;
  }
  
  .news-item-image {
    width: 100%;
    height: 200px;
  }
  
  .subscribe-form {
    flex-direction: column;
  }
  
  .subscribe-form input {
    min-width: 100%;
  }
  
  .date-nav {
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .date-nav select {
    min-width: 100%;
  }
  
  .search-form {
    margin-left: 0;
    width: 100%;
    max-width: none;
  }

  .search-form input {
    flex-grow: 1;
    min-width: 0;
  }

  .category-toggle-btn.active {
    background-color: var(--cream);
    border-color: var(--coffee-medium);
  }

  .category-filters {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .category-filters.show {
    display: grid; /* 펼쳤을 때 보임 */
  }

  .filter-btn {
    width: 100%;
    padding: 12px 16px;
  }

  .vote-buttons {
    gap: 10px;
  }

  .vote-btn {
    font-size: 1em;
    padding: 14px;
  }

  .admin-header {
    flex-direction: column;
    gap: 18px;
    padding: 25px 0;
  }

  .admin-header h1 {
    font-size: 1.8em;
  }

  .tabs {
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    padding: 12px 20px;
    font-size: 0.95em;
    white-space: nowrap;
  }

  .login-section {
    margin: 40px auto;
    padding: 35px 25px;
  }

  .mobile-nav {
    display: flex;
  }

  body {
    padding-bottom: 75px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .stat-card {
    padding: 24px;
  }

  .stat-number {
    font-size: 2.2em;
  }
}

/* 작은 모바일 화면 */
@media (max-width: 480px) {
  .header h1 {
    font-size: 1.5em;
  }

  .news-card {
    border-radius: 15px;
  }

  .news-body {
    padding: 18px;
  }

  .news-title {
    font-size: 1.2em;
  }

  .opinion-section, .subscribe-section {
    padding: 20px 15px;
  }

  .category-filters {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .vote-buttons {
    flex-direction: column;
  }

  .vote-btn {
    max-width: none;
  }
}

/* 프린트 스타일 */
@media print {
  .top-nav,
  .mobile-nav,
  .category-filters,
  .search-form,
  .opinion-form,
  .subscribe-section,
  .admin-header,
  .logout-btn {
    display: none !important;
  }

  .news-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  body {
    background: white;
    padding-bottom: 0;
  }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
  :root {
    --coffee-dark: #4a2f1a;
    --text-gray: #555555;
    --border-color: #999999;
  }

  .news-card,
  .opinion-item,
  .filter-btn {
    border-width: 2px;
  }
}

/* 애니메이션 감소 모드 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}

/* 포커스 개선 */
*:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 선택 영역 스타일 */
::selection {
  background: var(--coffee-light);
  color: var(--white);
}

::-moz-selection {
  background: var(--coffee-light);
  color: var(--white);
}

/* 푸터 (Footer) */
.footer {
  background-color: var(--coffee-dark);
  color: var(--white-fixed);
  padding: 40px 20px;
  margin-top: 60px;
  text-align: center;
  border-top: 4px solid var(--coffee-medium);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-quote {
  font-family: 'Gaegu', cursive, sans-serif; /* 귀여운 폰트가 있다면 적용, 없으면 기본 */
  font-size: 1.1em;
  color: var(--white-fixed);
  font-style: italic;
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white-fixed);
  text-decoration: underline;
}

.copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85em;
  margin-top: 10px;
}

/* 서비스 소개 모달 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none; /* 기본 숨김, JS로 flex 전환 */
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background-color: var(--white);
  padding: 35px 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  border: 2px solid var(--coffee-light);
}

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

.close-modal-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-gray);
  cursor: pointer;
  line-height: 1;
  padding: 0 5px;
}

/* 뉴스 상세 모달 */
.news-modal-content {
  background-color: var(--white);
  padding: 35px;
  border-radius: 20px;
  width: 90%;
  max-width: 650px; /* 더 넓게 */
  max-height: 85vh; /* 화면 높이의 85%까지만 */
  overflow-y: auto; /* 내용이 길면 스크롤 */
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  border: none;
}

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

/* --- 리팩토링: 인라인 스타일 대체 클래스 --- */

/* 유틸리티 */
.cursor-pointer { cursor: pointer; }
.w-100 { width: 100%; }

/* 팝업 및 모달 내부 스타일 */
.about-modal-title { color: var(--coffee-dark); margin-bottom: 15px; font-size: 1.5em; }
.about-modal-subtitle { font-weight: bold; color: var(--coffee-medium); margin-bottom: 20px; }
.about-modal-body { text-align: left; background: var(--cream); padding: 20px; border-radius: 15px; margin-bottom: 20px; font-size: 0.95em; line-height: 1.6; }
.about-modal-text { margin-bottom: 10px; }
.about-modal-list { margin-left: 20px; color: var(--text-dark); }
.about-modal-footer { font-size: 0.85em; color: var(--text-gray); }

.install-popup {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 350px;
  background: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid #f0f0f0;
}

.ios-popup { bottom: 100px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); z-index: 9999; }
.android-popup { bottom: 85px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); z-index: 10000; }

.popup-close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 20px; color: #999; cursor: pointer; padding: 0; }
.popup-title { margin: 0 0 10px 0; font-weight: bold; color: #6B4423; font-size: 16px; }
.popup-desc { margin: 0; font-size: 14px; color: #555; line-height: 1.6; }
.popup-icon { font-size: 18px; }
.popup-tail { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid white; }

.android-popup-title { margin: 0 0 5px 0; font-weight: bold; color: #6B4423; font-size: 16px; }
.android-popup-desc { margin: 0 0 15px 0; font-size: 13px; color: #666; }
.android-install-btn { background: #6B4423; color: white; border: none; padding: 12px 0; border-radius: 10px; font-weight: bold; cursor: pointer; width: 100%; font-size: 15px; box-shadow: 0 2px 5px rgba(107, 68, 35, 0.2); }

.install-app-btn {
  display: none;
  margin: 15px auto;
  padding: 12px 24px;
  background-color: #6B4423;
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 관리자 페이지 스타일 */
.admin-logo-icon { margin-right: 10px; }
.admin-card { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 5px 15px rgba(107, 68, 35, 0.15); }
.admin-card.mb-30 { margin-bottom: 30px; }
.admin-card.mt-30 { margin-top: 30px; }

.admin-section-title { margin-bottom: 30px; color: var(--coffee-dark); }
.admin-section-title-sm { margin-bottom: 25px; color: var(--coffee-dark); }
.admin-section-title-xs { margin-bottom: 15px; color: var(--coffee-dark); }
.admin-section-title-xxs { margin-bottom: 10px; color: var(--coffee-dark); }

.admin-desc { margin-bottom: 20px; color: #666; }
.admin-desc-lg { margin-bottom: 25px; color: #666; }

.admin-btn-group { display: flex; gap: 10px; }
.admin-save-btn { flex: 1; }
.admin-cancel-btn { display: none; background: #999; color: white; border: none; padding: 15px 30px; border-radius: 12px; font-weight: 700; cursor: pointer; }

.admin-stats-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-stats-text { font-weight: bold; color: var(--coffee-medium); }
.admin-reset-btn { display: none; padding: 8px 15px; font-size: 0.9em; }

.reorder-btn-group {
  display: none; /* 기본 숨김 */
  gap: 10px;
  margin-left: 10px;
}

/* 뉴스레터 미리보기 모달 */
.newsletter-modal-content {
  max-width: 800px;
  width: 95%;
  height: 90vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}
.newsletter-modal-header { padding: 15px 25px; background: var(--white); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.newsletter-modal-title { margin: 0; color: var(--coffee-dark); }
.newsletter-modal-close { position: static; }
.newsletter-modal-body { flex: 1; overflow-y: auto; padding: 20px; text-align: center; }
.newsletter-preview-box { display: inline-block; text-align: left; background: white; box-shadow: 0 0 20px rgba(0,0,0,0.1); }
.newsletter-modal-footer { padding: 15px 25px; background: var(--white); border-top: 1px solid var(--border-color); text-align: right; }
.newsletter-cancel-btn { margin-right: 10px; background: #999; color: white; border: none; padding: 12px 24px; border-radius: 10px; font-weight: bold; cursor: pointer; }

/* 기타 컴포넌트 */
.nickname-input {
  padding: 12px 18px;
  border: 2px solid var(--coffee-light);
  border-radius: 12px;
  font-size: 0.95em;
  background: var(--cream);
  color: var(--text-dark);
  width: 100%;
  box-sizing: border-box;
}
.recent-opinions-title {
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--coffee-dark);
  font-size: 1.5em;
}

/* 한입 지식 페이지 테마 (구분감 부여) */
body.knowledge-theme {
  background-color: #F8F5F2; /* 따뜻한 느낌의 미색 배경 */
}

body.knowledge-theme .header {
  background-color: transparent; /* 헤더 배경을 투명하게 하여 배경색과 통일 */
  box-shadow: none;
}

body.knowledge-theme .header:hover {
  background-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 20px rgba(107, 68, 35, 0.1);
}

body.knowledge-theme .nav-links a.active {
  background-color: #8D6E63; /* 한입 지식 탭 강조색 (IT/테크 색상 계열) */
  box-shadow: 0 2px 8px rgba(141, 110, 99, 0.3);
}

/* 서비스 소개 페이지 (About) */
.about-section {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  text-align: center;
}
.about-section h3 {
  color: var(--coffee-dark);
  font-size: 1.8em;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--cream);
  padding-bottom: 15px;
}
.about-text {
  font-size: 1.1em;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 20px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 40px;
}
.feature-item {
  background: var(--cream);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease;
}
.feature-item:hover {
  transform: translateY(-5px);
}
.feature-icon {
  font-size: 3em;
  margin-bottom: 15px;
  display: block;
}
.feature-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--coffee-dark);
  margin-bottom: 10px;
}
.feature-desc {
  color: var(--text-gray);
  line-height: 1.6;
}
.creator-info {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-gray);
}
.contact-section {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  margin-top: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  text-align: center;
}
.contact-section h3 {
  color: var(--coffee-dark);
  font-size: 1.8em;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--cream);
  padding-bottom: 15px;
}
.contact-desc {
  color: var(--text-gray);
  margin-bottom: 25px;
}
.contact-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}
.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95em;
  transition: all 0.2s;
  flex: 1;
  min-width: 160px;
  max-width: 300px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background-color: #FAFAFA;
}
.contact-btn-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-right: 12px;
}