body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column; /* Allow vertical stacking of sections */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box; /* Include padding in element's total width and height */
}

.container {
    background-color: #ffffff;
    padding: 2rem 3rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px; /* Space between sections */
}

h1 {
    color: #e63946;
    margin-bottom: 1.5rem;
}

hr {
    border: none;
    border-top: 1px dashed #ccc;
    margin: 2rem 0;
    width: 80%;
}

button {
    background: linear-gradient(45deg, #457b9d, #1d3557);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 2rem;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Lotto Section Styles */
.lotto-section {
    margin-bottom: 2rem;
}

#generate-lotto-btn {
    background: linear-gradient(45deg, #28a745, #218838); /* Green gradient */
    margin-bottom: 1rem;
}

#generate-lotto-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#lotto-games-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
}

.lotto-game {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lotto-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8d7da; /* Light red/pink background */
    color: #721c24; /* Dark red text */
    font-size: 1.1rem;
    font-weight: bold;
    border: 2px solid #dc3545;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Food Section Styles */
.food-section {
    margin-top: 2rem;
}

#result {
    text-align: left;
    margin-top: 2rem;
}

#result.hidden {
    display: none;
}

#food-name {
    color: #1d3557;
    border-bottom: 2px solid #e63946;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#recipe {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

#recipe h3 {
    margin-top: 0;
    color: #1d3557;
}

#recipe ol {
    padding-left: 20px;
}

#recipe li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Chore Roulette Section Styles */
.chore-section {
    margin-top: 2rem;
}

#spin-roulette-btn {
    background: linear-gradient(45deg, #ffc107, #e0a800); /* Yellow gradient */
    margin-bottom: 1rem;
}

#spin-roulette-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.roulette-wheel-container { /* This acts as roulette-container */
    position: relative;
    width: 300px; /* User provided size */
    height: 300px; /* User provided size */
    margin: 2rem auto;
    border-radius: 50%;
    box-shadow: 0 0 0 5px #e63946, 0 8px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Important for segments */
}

#roulette-wheel { /* This acts as wheel */
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    border: 5px solid #333;
    transition: transform 4s cubic-bezier(0.2, 0.8, 0.3, 1); /* User provided transition */
}

.roulette-segment {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 50%;
    transform-origin: 0% 100%; /* Rotate around the bottom-left corner of the half-radius slice */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Text positioned towards the outer edge */
    text-align: center;
    padding-bottom: 10px; /* Space from the outer edge */
    box-sizing: border-box;
    font-weight: bold;
    font-size: 0.9em; /* Smaller font size */
    color: #333; /* Darker text for better contrast */
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
    overflow: hidden; /* Hide overflowing text */
    clip-path: polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%); /* A trapezoid for a wider base */
}

.roulette-segment .segment-text-content {
    /* Inner text container to allow counter-rotation */
    white-space: nowrap; /* Prevent text wrapping */
    position: relative; /* Changed to relative */
    transform: none; /* No counter-rotation */
    bottom: auto; /* Removed specific bottom positioning */
}


#roulette-pointer { /* Adapted from user's #pointer */
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    z-index: 10;
    color: #e63946; /* To make it visible */
}

.result-text { /* Added for chore-final-result */
    font-size: 1.8rem;
    font-weight: bold;
    color: #1d3557; /* Dark blue text */
    min-height: 30px;
    margin-top: 1rem;
}

/* Lunch Roulette Section Styles */
.lunch-roulette-section {
    margin-top: 2rem;
}

#lunch-roulette-canvas {
    border: 5px solid #1d3557;
    border-radius: 50%;
    margin: 2rem auto;
    display: block; /* Center the canvas */
}

#spin-lunch-roulette-btn {
    background: linear-gradient(45deg, #007bff, #0056b3); /* Blue gradient */
}

#spin-lunch-roulette-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}