:root {
  --primary-color: #333;
  --highlight-color: #ff5722;
  --sky-blue: #74c0fc; /* Darkened from #a5d8ff */
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --nav-bg: #ffffff;
  --border-color: #f0f0f0;
  --text-muted: #999;
}

[data-theme="dark"] {
  --primary-color: #f1f3f5;
  --highlight-color: #ff7b52;
  --sky-blue: #4dabf7;
  --bg-color: #1a1b1e;
  --card-bg: #25262b;
  --nav-bg: #2c2e33;
  --border-color: #373a40;
  --text-muted: #909296;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background-color: var(--bg-color);
  color: var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 0 1rem 0;
  transition: background-color 0.3s, color 0.3s;
}

/* Navigation & Controls */
.top-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
  background-color: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.logo-text-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--highlight-color);
  cursor: pointer;
  padding: 0;
  letter-spacing: -0.5px;
}

.controls-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.control-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.control-btn:hover {
  border-color: var(--highlight-color);
  background-color: var(--card-bg);
}

.hidden {
  display: none !important;
}

header {
  text-align: center;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 1200px;
  position: relative;
}

.weather-controls-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 1rem;
  padding: 0 1rem;
}

.location-selector, .source-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.location-selector select, .source-selector select {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--primary-color);
  cursor: pointer;
  outline: none;
}

/* SVG Logo Styles */
.main-logo-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.main-logo {
  width: 100%;
  height: auto;
}

.logo-subtext {
  font-size: 18px;
  fill: #339af0; /* More vibrant sky blue */
  font-style: italic;
  font-weight: 600;
  transform: skewX(-10deg);
}

.logo-maintext {
  font-size: 30px;
  fill: var(--primary-color);
  font-weight: 400;
}

.highlight {
  font-weight: 900;
  fill: var(--highlight-color);
}

.date-info {
  width: 100%;
  max-width: 1200px;
  margin: 0.5rem auto 2rem;
  padding: 0 1rem;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Weather Table Styles */
.weather-table-container {
  width: 100%;
  max-width: 1200px;
  overflow-x: auto;
  background: var(--card-bg);
  padding: 1.5rem 0; /* Horizontal padding removed to fix sticky overlap */
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.weather-table-container::-webkit-scrollbar { height: 8px; }
.weather-table-container::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

th, td {
  padding: 1rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

th:not(.row-label), td:not(.row-label) {
  min-width: 100px;
  width: 100px;
}

th {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.row-label {
  font-weight: 700;
  background-color: var(--card-bg);
  position: sticky;
  left: 0;
  z-index: 20;
  width: 100px;
  min-width: 100px;
  padding-left: 1.5rem; /* Re-added padding here for aesthetics */
  text-align: left;
  border-right: 2px solid var(--border-color);
  box-shadow: 2px 0 5px -2px rgba(0,0,0,0.1); 
}

thead th.row-label {
  z-index: 21;
}

.weather-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.weather-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.temp {
  font-size: 1.2rem;
  font-weight: 600;
}

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

.highlight-row {
  background-color: rgba(255, 87, 34, 0.05);
}

.highlight-row .temp {
  color: var(--highlight-color);
}

/* Recommendation Section */
.recommendation-container {
  width: 100%;
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.comparison-summary {
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--highlight-color);
}

.recommendation-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.coord-details {
  width: 100%;
  text-align: center;
}

.coord-suggestion {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.coord-list {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.coord-list li {
  background-color: var(--bg-color);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  color: var(--primary-color);
}

/* Informational Guide Section */
.info-guide-section {
  width: 100%;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.guide-content {
  line-height: 1.8;
  color: var(--primary-color);
  font-size: 1.05rem;
}

.guide-content p {
  margin-bottom: 1.5rem;
}

/* Contact & Comment & Policy Sections */
.contact-container, .comment-section, .policy-container {
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.comment-section, .policy-container { max-width: 1200px; }

.section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--primary-color);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.contact-form textarea { height: 150px; }

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--highlight-color);
}

.submit-btn {
  background-color: var(--highlight-color);
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit-btn:hover { opacity: 0.9; }

/* Footer */
.main-footer {
  width: 100%;
  padding: 4rem 1.5rem;
  background-color: var(--nav-bg);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  text-align: center;
  box-sizing: border-box;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--highlight-color);
}

.footer-info {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-info a {
  color: var(--text-muted);
  text-decoration: none;
}

/* Style Items Grid */
.style-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  width: 100%;
}

.style-item-card {
  background-color: var(--bg-color);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.style-item-card:hover {
  transform: translateY(-5px);
  border-color: var(--highlight-color);
}

.style-item-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: #eee;
}

.style-item-name {
  padding: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  display: block;
}

@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    gap: 1rem;
  }
  .controls-container {
    width: 100%;
    justify-content: center;
  }
  .footer-links {
    gap: 1rem;
  }
  .style-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
