:root {
  --bg-primary: #faf7f0;
  --bg-secondary: #f2eee5;
  --surface: #ffffff;
  --accent-primary: #0f766e;
  --accent-secondary: #1d4ed8;
  --accent-tertiary: #b08968;
  --border: #e7dfd1;
  --text-primary: #1f2937;
  --text-secondary: #5b6472;
  --soft-highlight: linear-gradient(135deg, rgba(15,118,110,0.08), rgba(29,78,216,0.06));
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --font-heading: 'Georgia', serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 6px;
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-secondary);
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

ul {
  list-style-position: inside;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-primary);
  text-decoration: none;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--accent-primary);
}

.header-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--surface);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--accent-primary);
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn-secondary:hover {
  background-color: var(--accent-primary);
  color: var(--surface);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 5rem 0 4rem;
  background: var(--soft-highlight);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hero h1 {
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.section-header h2 {
  margin-bottom: 0;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Cards */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-rank {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent-tertiary);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.card-country {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.card-artist {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-chance {
  margin-top: auto;
  display: inline-block;
  background-color: var(--bg-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-primary);
}

.prediction-card p {
  font-size: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 0;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 900px;
}

th, td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

td {
  font-size: 0.95rem;
}

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

tr:hover td {
  background-color: var(--bg-primary);
}

.col-rank { font-weight: bold; color: var(--accent-tertiary); }
.col-country { font-weight: 600; }
.col-chance { font-weight: bold; color: var(--accent-primary); }
.col-odds { font-variant-numeric: tabular-nums; color: var(--text-secondary); }

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Editorial Content (Legal, About, Guide) */
.editorial-content {
  background-color: var(--surface);
  padding: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
}

.editorial-content h2 { margin-top: 2rem; }
.editorial-content h3 { margin-top: 1.5rem; font-size: 1.25rem; }
.editorial-content p { font-size: 1.05rem; }

.address-block {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  font-style: normal;
  line-height: 1.8;
  border-left: 3px solid var(--accent-tertiary);
}

/* Footer */
footer {
  margin-top: auto;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-col ul a:hover {
  color: var(--accent-primary);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 1rem;
}

.footer-address {
  font-style: normal;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Fade in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries */
@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  
  nav.active {
    display: block;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .header-cta .btn-secondary {
    display: none;
  }
  
  .hero { padding: 3rem 0; }
  .editorial-content { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}