:root {
  --bg-color: #f7f5f2;
  /* Warm paper */
  --ink-color: #1a1a1a;
  --accent-color: #d00000;
  /* Newspaper red */
  --border-style: 2px solid var(--ink-color);
  --font-serif: 'Songti SC', 'SimSun', 'Noto Serif SC', 'Georgia', serif;
  --font-mono: 'Menlo', 'Courier New', monospace;
}

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

body {
  font-family: var(--font-serif);
  background-color: var(--bg-color);
  color: var(--ink-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Main Ticket Container */
.weather-ticket {
  background: #ffffff;
  width: 100%;
  max-width: 400px;
  border: var(--border-style);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

/* Header Section */
.ticket-header {
  border-bottom: var(--border-style);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.date-stamp {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Main Status Section */
.status-section {
  padding: 40px 20px;
  text-align: center;
  border-bottom: var(--border-style);
  background-image: radial-gradient(#ddd 1px, transparent 1px);
  background-size: 20px 20px;
}

.location-name {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 10px;
  display: inline-block;
  border-bottom: 1px solid var(--ink-color);
}

.temperature {
  font-size: 6rem;
  line-height: 1;
  font-weight: 700;
  margin: 10px 0;
}

.condition {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Details Grid */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.detail-box {
  padding: 15px;
  border-right: var(--border-style);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-box:last-child {
  border-right: none;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #666;
}

.value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

/* Footer Section */
.ticket-footer {
  padding: 15px 20px;
  border-top: var(--border-style);
  /* Redundant but safe */
  font-size: 0.7rem;
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  background: #fdfdfd;
}

.source-link {
  color: var(--ink-color);
  font-weight: 700;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
  color: var(--accent-color);
}

/* Loading/Error */
.state-message {
  padding: 50px;
  text-align: center;
  font-family: var(--font-mono);
}

.state-message p {
  margin-bottom: 15px;
}

.retry-btn {
  background: var(--ink-color);
  color: white;
  border: none;
  font-family: var(--font-mono);
  padding: 10px 20px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 700;
}

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

@media (max-width: 400px) {
  .ticket-footer {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}