/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-color: #f5f5f5;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* HEADER */
header {
  background: white;
  padding: 20px 16px;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 100;
}

#logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: fit-content;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  color: #da4527;
  letter-spacing: -0.5px;
}

#tagline {
  margin-top: 6px;
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

/* LOADING SCREEN */
#loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e5e5;
  border-top: 3px solid #da4527;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loading-screen p {
  color: #666;
  font-size: 14px;
}

/* ERROR MESSAGE */
#error-message {
  padding: 16px;
  max-width: 600px;
  margin: 40px auto;
}

.error-box {
  background: white;
  border: 2px solid #dc2626;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.error-box h3 {
  color: #dc2626;
  margin-bottom: 12px;
}

.error-box p {
  color: #666;
  margin-bottom: 16px;
}

.error-box button {
  background: #da4527;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.error-box button:hover {
  opacity: 0.9;
}

/* MAIN CONTAINER */
#main-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* CITY HEADER */
#city-header {
  margin-bottom: 24px;
}

#city-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.city-subtitle {
  color: #666;
  font-size: 15px;
}

/* SEARCH BAR (future) */
#search-bar {
  margin-bottom: 20px;
}

#search-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 16px;
  background: white;
}

#search-input:focus {
  outline: none;
  border-color: #da4527;
}

/* RESTAURANT LIST */
#restaurant-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.restaurant-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.restaurant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #da4527;
}

.restaurant-card:active {
  transform: translateY(0);
}

.restaurant-info {
  flex: 1;
}

.restaurant-name {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.restaurant-meta {
  font-size: 14px;
  color: #666;
}

.separator {
  margin: 0 6px;
  color: #ccc;
}

.restaurant-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  background: #da4527;
  border-radius: 8px;
  min-width: 60px;
}

.score-number {
  font-size: 24px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.score-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
}

/* RESTAURANT DETAIL VIEW */
#restaurant-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  margin-bottom: 20px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: #f9f9f9;
  color: #da4527;
}

#detail-header {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid #e5e5e5;
}

#detail-name {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

#detail-meta {
  font-size: 15px;
  color: #666;
  margin-bottom: 16px;
}

#detail-score-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px;
  background: #da4527;
  border-radius: 10px;
}

.score-badge .score-number {
  font-size: 36px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.score-badge .score-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 4px;
}

/* DISHES CONTAINER */
#dishes-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e5e5e5;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 20px;
}

#dishes-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dish-card {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 20px;
}

.dish-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dish-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.dish-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #da4527;
  color: white;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.dish-info {
  flex: 1;
}

.dish-name {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.dish-category {
  display: inline-block;
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: capitalize;
}

.dish-description {
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  margin-top: 8px;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state h3 {
  font-size: 20px;
  color: #1a1a1a;
  margin-bottom: 8px;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  #detail-name {
    font-size: 28px;
  }
  
  .restaurant-name {
    font-size: 18px;
  }
  
  .restaurant-card {
    padding: 16px;
  }
  
  #city-header h2 {
    font-size: 28px;
  }
}

/* SMOOTH TRANSITIONS */
#main-container,
#restaurant-detail {
  animation: fadeIn 0.3s ease;
}

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