:root {
    --forest-green: #19352D;
    --emerald: #28665B;
    --warm-orange: #AF702C;
    --coral: #D96C4F;
    --golden-yellow: #E3B341;
    --plum: #76539A;
    --cream: #F5F0E6;
    --white: #FFFEFA;
    
    --font-heading: 'Georgia', serif;
    --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--cream);
    background-image: radial-gradient(var(--golden-yellow) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: -19px -19px;
    color: var(--forest-green);
    font-family: var(--font-body);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--forest-green);
    margin-top: 0;
}

a {
    color: var(--emerald);
    text-decoration: underline;
    text-decoration-color: var(--warm-orange);
    text-decoration-thickness: 2px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

a:hover, a:focus {
    color: var(--coral);
    text-decoration-color: var(--coral);
}

:focus-visible {
    outline: 3px solid var(--warm-orange);
    outline-offset: 3px;
    border-radius: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
.site-header {
    background-color: var(--white);
    border-bottom: 4px solid var(--emerald);
    box-shadow: 0 4px 12px rgba(25, 53, 45, 0.05);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--forest-green);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--golden-yellow);
    border-radius: 50%;
    border: 3px solid var(--forest-green);
}

.brand:hover {
    color: var(--emerald);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    font-weight: bold;
    color: var(--forest-green);
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.main-nav a:hover, .main-nav a:focus {
    background-color: var(--emerald);
    color: var(--white);
}

/* Hero Section */
.hero {
    background-color: var(--forest-green);
    color: var(--cream);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 8px solid var(--warm-orange);
}

.hero h1 {
    color: var(--golden-yellow);
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

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

.hero-visuals {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-element {
    position: absolute;
    animation: float 6s infinite ease-in-out;
}

.floating-element.delay-1 { animation-delay: -2s; }
.floating-element.delay-2 { animation-delay: -4s; }

.fe-1 { top: 15%; left: 10%; width: 60px; height: 60px; }
.fe-2 { bottom: 20%; right: 15%; width: 80px; height: 80px; }
.fe-3 { top: 30%; right: 10%; width: 50px; height: 50px; opacity: 0.7; }
.fe-4 { bottom: 10%; left: 20%; width: 70px; height: 70px; opacity: 0.5; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* Main Content Area */
main {
    flex: 1;
    padding: 40px 0;
}

.editorial-content {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(25, 53, 45, 0.08);
    border-top: 4px solid var(--emerald);
    margin-bottom: 40px;
}

/* Interactive Lottery Numbers */
.numbers-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.lottery-ball {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    background: var(--white);
    color: var(--forest-green);
    border: 2px solid var(--emerald);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s, color 0.3s, box-shadow 0.3s;
    user-select: none;
}

.lottery-ball:hover, .lottery-ball:focus {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 6px 12px rgba(40, 102, 91, 0.2);
}

.lottery-ball:active {
    transform: scale(0.95);
}

.lottery-ball.selected {
    background-color: var(--coral);
    color: var(--white);
    border-color: var(--coral);
    animation: pop 0.3s ease-out;
}

.lottery-ball.euro-ball {
    background-color: var(--white);
    border-color: var(--golden-yellow);
    color: var(--forest-green);
}

.lottery-ball.euro-ball.selected {
    background-color: var(--golden-yellow);
    color: var(--forest-green);
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Archive Tables */
.table-responsive {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.archive-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    text-align: left;
}

.archive-table th {
    background-color: var(--forest-green);
    color: var(--cream);
    padding: 15px;
    font-family: var(--font-heading);
    white-space: nowrap;
}

.archive-table td {
    padding: 15px;
    border-bottom: 1px solid #E0DCD3;
    vertical-align: middle;
}

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

.archive-table tr:hover td {
    background-color: #FDFBFC;
}

/* Controls */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--warm-orange);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 15px;
}

.btn-primary {
    background-color: var(--emerald);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--forest-green);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--emerald);
    border: 2px solid var(--emerald);
    padding: 8px 18px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--emerald);
    color: var(--white);
}

.filter-group select {
    padding: 8px 12px;
    border: 2px solid #E0DCD3;
    border-radius: 4px;
    font-size: 1rem;
    color: var(--forest-green);
    background-color: var(--white);
    cursor: pointer;
}

/* Mini Game */
.mini-game {
    background-color: var(--plum);
    color: var(--cream);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(118, 83, 154, 0.2);
}

.mini-game::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.mini-game h2 {
    color: var(--golden-yellow);
    margin-bottom: 10px;
}

.game-cards {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.game-card {
    width: 70px;
    height: 90px;
    background-color: var(--cream);
    border: 3px solid var(--golden-yellow);
    border-radius: 8px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--forest-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
    box-shadow: 0 6px 0 var(--golden-yellow);
}

.game-card:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 11px 0 var(--golden-yellow);
}

.game-card:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 0 var(--golden-yellow);
}

.game-card.flipping {
    animation: flipCard 0.4s ease-in-out;
}

.game-card.revealed {
    background-color: var(--emerald);
    color: var(--white);
    border-color: var(--emerald);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: default;
}

@keyframes flipCard {
    0% { transform: scale(1) rotateY(0deg); }
    50% { transform: scale(1.2) rotateY(90deg); }
    100% { transform: scale(1) rotateY(0deg); }
}

.game-result {
    font-size: 1.2rem;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    animation: fadeIn 0.5s ease-in-out;
}

.celebration-text {
    display: block;
    color: var(--golden-yellow);
    margin-top: 5px;
    font-weight: bold;
}

.disclaimer-text {
    font-size: 0.85rem;
    opacity: 0.8;
    max-width: 700px;
    margin: 20px auto 0;
}

.hidden {
    display: none !important;
}

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

/* Footer */
.site-footer {
    background-color: var(--forest-green);
    color: var(--cream);
    padding: 60px 20px 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-col h3 {
    color: var(--golden-yellow);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

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

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--cream);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--warm-orange);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(245, 240, 230, 0.2);
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--forest-green);
    color: var(--cream);
    padding: 15px 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 4px solid var(--golden-yellow);
    box-sizing: border-box;
}

.cookie-content {
    max-width: 800px;
    font-size: 0.95rem;
}

.cookie-content p {
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
}

.cookie-actions a {
    color: var(--golden-yellow);
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .editorial-content {
        padding: 20px;
    }
}