/* ==========================================
   CineAHO Restaurant Finder - styles.css
   ========================================== */

.rf-page-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

/* ── Hero ── */
.rf-hero {
  padding: 2.5rem 2rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.rf-hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.badge-capsule {
  display: inline-flex;
  align-items: center;
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fb923c;
  width: fit-content;
  margin-bottom: 0.5rem;
}
.pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: #f97316;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse-anim 1.6s infinite;
}
@keyframes pulse-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(249,115,22,0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(249,115,22,0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(249,115,22,0); }
}
.hero-title {
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}
.hero-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* ── API Tabs ── */
.rf-search-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.api-tab-bar {
  display: flex;
  gap: 0;
  padding: 6px;
  border-radius: 14px;
  overflow: hidden;
}
.api-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
}
.api-tab:hover {
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
}
.api-tab.active {
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.api-tab.active[data-source="naver"] {
  background: linear-gradient(135deg, #1ec800 0%, #00c73c 100%);
}
.api-tab.active[data-source="kakao"] {
  background: linear-gradient(135deg, #fee500 0%, #fbbf24 100%);
  color: #3c1e1e;
}
.api-tab.active[data-source="google"] {
  background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
}
.tab-icon {
  display: inline-flex;
  width: 22px; height: 22px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Outfit', sans-serif;
}
.naver-icon { background: #00c73c; }
.kakao-icon { background: #fee500; color: #3c1e1e; }
.google-icon { background: #4285f4; }
.rating-badge {
  font-size: 0.62rem;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.3);
  color: #fbbf24;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
}

/* ── Search Bar ── */
.search-bar-container {
  padding: 1.25rem;
  border-radius: 16px;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 0 16px;
  transition: all 0.3s ease;
}
.search-input-wrap:focus-within {
  border-color: rgba(249,115,22,0.4);
  box-shadow: 0 0 20px rgba(249,115,22,0.1);
}
.search-icon {
  color: var(--text-muted);
  font-size: 1rem;
}
#search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.92rem;
  padding: 0.85rem 0;
  font-family: 'Noto Sans KR', sans-serif;
}
#search-input::placeholder {
  color: var(--text-dark);
}
.btn-search {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}
.search-options {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.option-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.option-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.option-group select {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
}
.toggle-switch {
  position: relative;
  width: 36px; height: 20px;
  cursor: pointer;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: rgba(249,115,22,0.3);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
  background: #f97316;
}
.location-info {
  font-size: 0.72rem;
  color: #10b981;
}

/* ── Quick Tags ── */
.quick-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tag-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.tag-btn:hover {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.25);
  color: #fb923c;
  transform: translateY(-1px);
}

/* ── Result Stats ── */
.rf-results-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 300px;
}
.result-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
}
.stats-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stats-source {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.stats-source.naver { background: rgba(0,199,60,0.15); color: #00c73c; }
.stats-source.kakao { background: rgba(254,229,0,0.15); color: #d9a600; }
.stats-source.google { background: rgba(66,133,244,0.15); color: #4285f4; }
.stats-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}
.stats-query {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.stats-time {
  font-size: 0.7rem;
  color: var(--text-dark);
}

/* ── Loading ── */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-muted);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.05);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ── */
.error-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border-color: rgba(244,63,94,0.2);
  color: #f43f5e;
  font-size: 0.85rem;
}
.error-container i { font-size: 1.2rem; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}
.empty-state > p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}
.api-info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.api-info-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}
.api-info-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-3px);
}
.api-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: #fff;
}
.api-info-card h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
}
.api-info-card p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.api-note {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  color: var(--text-dark);
}
.api-note.has-rating {
  background: rgba(251,191,36,0.1);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.2);
}

/* ── Results Grid ── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

/* ── Restaurant Card ── */
.restaurant-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.restaurant-card:hover {
  border-color: rgba(249,115,22,0.25);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.restaurant-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f97316, #ea580c, #fbbf24);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.restaurant-card:hover::before { opacity: 1; }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.card-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  flex-shrink: 0;
}
.rank-top { background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); color: #fff; }
.rank-normal { background: rgba(255,255,255,0.04); color: var(--text-muted); }
.card-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}
.card-category {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.2);
  color: #c084fc;
  white-space: nowrap;
}

/* Rating Stars */
.card-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rating-stars {
  display: flex;
  gap: 2px;
  font-size: 0.85rem;
}
.star-filled { color: #fbbf24; filter: drop-shadow(0 0 3px rgba(251,191,36,0.3)); }
.star-half { color: #fbbf24; opacity: 0.6; }
.star-empty { color: rgba(255,255,255,0.08); }
.rating-value {
  font-size: 0.95rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: #fbbf24;
}
.rating-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.no-rating {
  font-size: 0.72rem;
  color: var(--text-dark);
  font-style: italic;
}

/* Card Details */
.card-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.detail-row i {
  width: 14px;
  text-align: center;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--text-dark);
}
.detail-row a {
  color: #60a5fa;
  text-decoration: none;
}
.detail-row a:hover {
  text-decoration: underline;
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.btn-card-action {
  flex: 1;
  padding: 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-card-action:hover {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.2);
  color: #fb923c;
}

/* Business Status */
.status-open {
  color: #10b981;
  font-size: 0.68rem;
  font-weight: 700;
}
.status-closed {
  color: #f43f5e;
  font-size: 0.68rem;
  font-weight: 700;
}

/* ── Pagination ── */
.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.btn-page {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-page:hover {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.2);
  color: #fb923c;
}
.btn-page:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.page-info {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ── Settings Panel ── */
.rf-settings-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s ease;
  user-select: none;
}
.settings-toggle:hover {
  color: var(--text-main);
  border-color: rgba(255,255,255,0.08);
}
.toggle-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
}
.toggle-arrow.open { transform: rotate(180deg); }

.settings-panel {
  padding: 1.25rem;
  border-radius: 0 0 14px 14px;
  margin-top: -1px;
  border-top: 1px solid rgba(255,255,255,0.03);
}
.settings-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.75rem 1rem;
  background: rgba(59,130,246,0.05);
  border: 1px solid rgba(59,130,246,0.1);
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.settings-info i { color: #60a5fa; margin-top: 2px; }
.api-key-status {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.key-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}
.key-status-badge.ok {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  color: #10b981;
}
.key-status-badge.missing {
  background: rgba(244,63,94,0.05);
  border: 1px solid rgba(244,63,94,0.1);
  color: #f43f5e;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.setting-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.setting-group label .tab-icon { width: 16px; height: 16px; font-size: 0.55rem; border-radius: 4px; }
.setting-group input {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-main);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  transition: border-color 0.3s;
}
.setting-group input:focus {
  border-color: rgba(249,115,22,0.4);
}
.settings-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.btn-save-keys {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}
.btn-save-keys:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249,115,22,0.3); }
.btn-clear-keys {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}
.btn-clear-keys:hover { background: rgba(244,63,94,0.08); border-color: rgba(244,63,94,0.2); color: #f43f5e; }

/* ── Guide Section ── */
.rf-guide-section {
  padding: 2rem;
  border-radius: 20px;
}
.guide-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}
.guide-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
}
.guide-index-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.guide-index-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}
.guide-index-list li:hover {
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
}
.guide-index-list li.active {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.15);
  color: #fb923c;
}
.guide-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.guide-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.2);
  color: #fb923c;
  width: fit-content;
}
.guide-content h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}
.guide-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.guide-body strong { color: var(--text-main); }

/* ── Floating Nav ── */
.floating-nav {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}
.floating-nav button {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floating-nav button:hover {
  background: rgba(249,115,22,0.1);
  border-color: rgba(249,115,22,0.2);
  color: #fb923c;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .api-info-cards { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .guide-layout { grid-template-columns: 1fr; }
  .api-tab-bar { flex-wrap: wrap; }
}
