@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  /* A fun, playful, vibrant color palette */
  --bg: #F9F3F9; /* Soft light lavender/pink base */
  --panel: #FFFFFF;
  --text: #3D3D53;
  --accent1: #FF4785; /* Bright Pinkish-Red */
  --accent2: #9B51E0; /* Fun bright purple */
  --accent3: #FFA300; /* Warm bright yellow/orange */
  --accent4: #FF7F50; /* Coral */
  --accent5: #FFD700; /* Gold */
  --border: #F0E6EF;
  --shadow: 0 10px 25px -5px rgba(255, 71, 133, 0.15), 0 8px 10px -6px rgba(255, 71, 133, 0.1);
  --shadow-hover: 0 20px 25px -5px rgba(155, 81, 224, 0.25), 0 10px 10px -5px rgba(155, 81, 224, 0.15);
  --radius: 20px; /* Highly rounded corners for a fun feel */
  
  --spacing-base: 12px;
  --padding-main: 40px;
  --rhythm: 64px;
  --rhythm-dense: 28px;
}

@media (max-width: 1279px) {
  :root {
    --padding-main: 24px;
  }
}

@media (max-width: 767px) {
  :root {
    --padding-main: 16px;
    --rhythm: 40px;
  }
}

@media (min-width: 768px) and (max-width: 999px) {
  :root {
    --rhythm: 48px;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 100% 100%, rgba(155, 81, 224, 0.05) 0%, transparent 50%),
                    radial-gradient(circle at 0% 0%, rgba(255, 71, 133, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
  }
}

/* Background Particles */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: floatParticle 15s infinite ease-in-out;
}

@keyframes floatParticle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.1); }
}

h1, h2, h3, h4 {
  font-family: 'Fredoka', Arial, sans-serif;
  color: var(--text);
  margin-top: 0;
  margin-bottom: var(--spacing-base);
  line-height: 1.3;
}

h1 {
  font-size: 42px;
  color: var(--accent1);
}

h2 {
  font-size: 28px;
}

a {
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 2px dashed var(--accent2);
  transition: all 200ms ease-in-out;
}

a:hover {
  color: var(--accent1);
  border-bottom-color: var(--accent1);
  background: rgba(255, 71, 133, 0.05);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Layout */
.site-wrapper {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--padding-main);
  gap: 32px;
}

.left-rail {
  width: 224px;
  flex-shrink: 0;
  padding-top: var(--rhythm);
}

.main-content {
  width: 100%;
  max-width: 940px;
  padding-bottom: var(--rhythm);
}

/* Masthead */
.masthead-wrapper {
  background: linear-gradient(135deg, var(--accent1), var(--accent3), var(--accent2));
  background-size: 200% 200%;
  animation: gradientBG 8s ease infinite;
  border-bottom: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.masthead-wrapper::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg);
  border-radius: 50% 50% 0 0;
}

.masthead {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px var(--padding-main) 40px var(--padding-main);
  gap: 6px;
  position: relative;
  z-index: 2;
}

.site-title {
  font-family: 'Fredoka', Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  border-bottom: none;
  color: #FFFFFF;
  margin-bottom: 2px;
  display: inline-block;
  transition: transform 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.site-title:hover {
  transform: scale(1.05) rotate(-2deg);
  color: #FFFFFF;
  background: transparent;
}

.top-utility {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.newest-result-row {
  border-top: 2px dashed rgba(255, 255, 255, 0.4);
  padding-top: 12px;
  margin-top: 8px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #FFFFFF;
}

/* Image Utilities */
.hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  object-fit: cover;
  aspect-ratio: 21 / 9;
  transition: transform 300ms ease;
}

.hero-image:hover {
  transform: translateY(-5px);
}

.article-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

/* Mobile Nav */
@media (max-width: 767px) {
  .site-wrapper {
    flex-direction: column;
    gap: 0;
  }
  .left-rail {
    width: 100%;
    padding-top: 0;
    height: 64px;
    background-color: var(--panel);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .nav-list {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0 16px;
    list-style: none;
  }
  .nav-list li {
    margin-bottom: 0 !important;
  }
  .hero-image {
    aspect-ratio: 16 / 9;
  }
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list li {
  margin-bottom: 12px;
}

.nav-list a {
  text-decoration: none;
  border-bottom: none;
  color: var(--text);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 50px; 
  transition: all 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: block;
}

.nav-list a:hover {
  background-color: var(--border);
  color: var(--accent1);
  transform: translateX(5px);
}

.nav-list a.active {
  background-color: var(--accent2);
  color: #FFFFFF;
}
.nav-list a.active:hover {
  background-color: #7D3EC1;
  color: #FFFFFF;
}

/* Components */
.section {
  margin-top: var(--rhythm);
}

.panel {
  background-color: var(--panel);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--rhythm-dense);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.date-spine {
  border-left: 4px dashed var(--accent2);
  padding-left: 24px;
  margin-left: 12px;
}

.date-spine-item {
  position: relative;
  margin-bottom: var(--rhythm-dense);
}

.date-spine-item::before {
  content: "★";
  color: var(--accent3);
  font-size: 20px;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: -39px;
  top: 18px;
  width: 24px;
  height: 24px;
  background-color: var(--panel);
  border: 3px solid var(--accent2);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(155, 81, 224, 0.3);
}

.ledger-row {
  background-color: var(--panel);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  transition: transform 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 200ms ease, border-color 200ms ease;
}

.ledger-row:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent2);
}

/* Number displays */
.number-pool {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.num-cell {
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 700;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 3px solid var(--accent1);
  border-radius: 50%;
  color: var(--accent1);
  box-shadow: 0 4px 10px rgba(255, 71, 133, 0.2);
  transition: all 200ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.num-cell:hover {
  transform: scale(1.2) rotate(10deg);
  background: var(--accent1);
  color: #FFF;
}

.num-cell.euro {
  border-color: var(--accent2);
  background-color: var(--accent2);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(155, 81, 224, 0.3);
}

.num-cell.euro:hover {
  background: var(--panel);
  color: var(--accent2);
  transform: scale(1.2) rotate(-10deg);
}

/* Tables */
.data-table-wrapper {
  overflow-x: auto;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 16px 14px;
  text-align: center;
  border-bottom: 2px dashed var(--border);
  border-right: 2px dashed var(--border);
}

th {
  background-color: #FFF5F7;
  color: var(--accent1);
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  border-bottom: 3px solid var(--accent1);
}

.matrix-table td {
  font-family: 'Fredoka', monospace;
  font-weight: 600;
  font-size: 16px;
}

/* Filter controls */
.filter-bar {
  background-color: var(--panel);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  color: var(--accent2);
  margin-bottom: 8px;
}

select, input, button {
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 20px;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--panel);
  color: var(--text);
  outline: none;
  transition: all 200ms ease;
}

select:focus, input:focus {
  border-color: var(--accent1);
  box-shadow: 0 0 0 4px rgba(255, 71, 133, 0.2);
}

button {
  background: var(--border);
  color: var(--text);
  cursor: pointer;
  border: 2px solid transparent;
}

button:hover {
  background: #E2D6E2;
  transform: translateY(-2px);
}

button:active, .btn-primary:active, .btn-secondary:active, .btn-lucky:active {
  transform: translateY(2px) scale(0.95);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}

.btn-primary {
  background: var(--accent1);
  color: #FFFFFF;
  border-color: var(--accent1);
  box-shadow: 0 6px 15px rgba(255, 71, 133, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary:hover {
  background: #E81C65;
  color: #FFFFFF;
  border-color: #E81C65;
  box-shadow: 0 8px 20px rgba(255, 71, 133, 0.4);
  transform: translateY(-3px) scale(1.05);
}

.btn-secondary {
  background: var(--panel);
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
  border-color: var(--accent2);
}

/* Lucky Pick Mini Game */
.lucky-pick-panel {
  text-align: center;
  border: 4px dashed var(--accent2);
  background-color: #FBF0FF;
  position: relative;
  overflow: hidden;
}

.lucky-pick-panel::before {
  content: "🍀";
  font-size: 80px;
  position: absolute;
  top: -20px;
  right: -20px;
  opacity: 0.1;
  transform: rotate(15deg);
}

.lucky-pick-panel::after {
  content: "💎";
  font-size: 60px;
  position: absolute;
  bottom: -10px;
  left: -10px;
  opacity: 0.1;
  transform: rotate(-15deg);
}

.lucky-pick-container {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  position: relative;
}

.btn-lucky {
  font-size: 18px;
  padding: 16px 32px;
  background: var(--accent3);
  border-color: var(--accent3);
  color: white;
  box-shadow: 0 6px 15px rgba(255, 163, 0, 0.4);
  z-index: 2;
}

.btn-lucky:hover {
  background: #E59300;
  border-color: #E59300;
  box-shadow: 0 8px 20px rgba(255, 163, 0, 0.5);
}

.lucky-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.hidden {
  display: none !important;
}

.large-num {
  width: 90px;
  height: 90px;
  font-size: 42px;
  background: var(--accent1);
  color: white;
  border: 4px solid white;
  box-shadow: 0 8px 25px rgba(255, 71, 133, 0.4);
}

.lucky-subtitle {
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent2);
  margin-top: 12px;
}

.pop-animation {
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  0% { transform: scale(0.1) rotate(-20deg); opacity: 0; }
  80% { transform: scale(1.1) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Confetti Explosion Animation */
.confetti {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  animation: explosion 2.5s ease-out forwards;
  z-index: 50;
  pointer-events: none;
}

@keyframes explosion {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.3); opacity: 0; }
}

/* Reading Columns */
.reading-column {
  max-width: 760px;
  font-size: 18px;
}

/* FAQ */
details {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  background: var(--panel);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 200ms;
}

details:hover {
  box-shadow: var(--shadow-hover);
}

summary {
  padding: 18px 24px;
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent2);
  cursor: pointer;
  background: var(--panel);
  transition: background 150ms;
  outline: none;
}

summary:hover {
  background: #FBF0FF;
}

details[open] summary {
  border-bottom: 2px dashed var(--border);
  background: #FBF0FF;
  color: var(--accent1);
}

.details-content {
  padding: 24px;
  font-size: 17px;
}

/* Footer */
.site-footer {
  background-color: #2D283E;
  background-image: radial-gradient(circle at top right, rgba(155, 81, 224, 0.15) 0%, transparent 40%);
  color: #D6CDE6;
  border-top: none;
  margin-top: var(--rhythm);
  padding: var(--rhythm) var(--padding-main);
  font-size: 15px;
  border-radius: 40px 40px 0 0;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    border-radius: 20px 20px 0 0;
  }
}

.footer-col h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  margin-bottom: 20px;
  color: #FFA300;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.site-footer a {
  color: #E2D6E2;
  border-bottom: none;
  transition: all 150ms ease;
}

.site-footer a:hover {
  color: var(--accent4);
  background: none;
  padding-left: 5px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: 10px;
}

.form-group input, .form-group textarea {
  width: 100%;
  max-width: 480px;
  font-family: 'Nunito', Arial, sans-serif;
  border-radius: 16px;
}

/* Accessibility */
:focus-visible {
  outline: 4px dashed var(--accent1);
  outline-offset: 4px;
}

/* Cookie Banner */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--panel);
  border-top: 4px solid var(--accent2);
  box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
  padding: 16px var(--padding-main);
  z-index: 9999;
}

.cookie-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cookie-content p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-link {
  font-weight: 700;
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 2px dashed var(--accent2);
  transition: all 150ms ease;
}

.cookie-link:hover {
  color: var(--accent1);
  border-bottom-color: var(--accent1);
  background: transparent;
  padding-left: 0;
}

@media (max-width: 767px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .cookie-actions {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }
  .cookie-actions button {
    width: 100%;
  }
  .cookie-link {
    margin-bottom: 8px;
  }
}