body {
    font-family: sans-serif;
    margin: 0; /* Reset body margin */
    padding: 20px; /* Add some padding to the body */
    background-color: #f4f4f4; /* Light background color */
    display: flex; /* Enable flexbox for body */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically in viewport */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
}

.container {
    width: 80%;
    max-width: 800px; /* Increased max-width for better readability on larger screens */
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px; /* Slightly larger border-radius for a softer look */
    background-color: white; /* White container background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow for depth */
    display: flex; /* Enable flexbox for container */
    flex-direction: column; /* Stack container elements vertically */
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333; /* Darker heading color */
}

.input-area,
.participants-area,
.prizes-area,
.lottery-area,
.result-area,
.history-area { /* Renamed to result-area to match HTML */
    margin-bottom: 20px;
}

.input-area {
    display: flex; /* Flexbox for input area to align input and button */
    gap: 10px; /* Spacing between input and button */
    align-items: center; /* Vertically align items in input area */
}

input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px; /* Slightly more rounded input fields */
    flex-grow: 1; /* Input takes up available space */
    min-width: 0; /* Prevent input from overflowing container */
}

button {
    padding: 10px 20px;
    background-color: #007bff; /* Bootstrap primary color */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* Smooth hover transition */
}

button:hover {
    background-color: #0056b3; /* Darker shade on hover */
}

.participants-area h2,
.prizes-area h2,
.result-area h2,
.history-area h2 {
    margin-top: 0; /* Reset top margin for section titles */
    margin-bottom: 10px;
    color: #555; /* Slightly lighter section title color */
}

#lotteryResults {
    margin-top: 20px; /* Add some top margin for result table */
}

#lotteryResults th, #lotteryResults td {
    width: auto; /* Reset width for result table cells */
    text-align: center; /* Center text in result table cells */
}

#lotteryResults th {
    background-color: #e0e0e0; /* Slightly different background for result table header */
}

.remaining-items-area {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.remaining-items-area h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #777; /* Even lighter color for remaining items titles */
}

.remaining-items-area ul {
    padding-left: 20px;
    list-style-type: disc; /* Use disc bullets for remaining items list */
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    width: 20%;  /* Adjust cell width for 5 columns */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    word-break: break-all; /* Break long words to prevent overflow */
}

th {
    background-color: #f0f0f0;
    font-weight: bold;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        width: 95%; /* Wider container on smaller screens */
        margin: 10px auto; /* Adjust margins for smaller screens */
    }

    .input-area {
        flex-direction: column; /* Stack input and button vertically on smaller screens */
        align-items: stretch; /* Stretch items to full width */
    }

    input[type="text"] {
        margin-bottom: 10px; /* Add margin below input when stacked */
    }

    th, td {
        width: auto; /* Reset width on smaller screens to allow flexible layout */
        display: block; /* Stack cells vertically on smaller screens */
        border-bottom: 1px dashed #ddd; /* Change border to dashed for stacked cells */
        text-align: left; /* Re-align text to left for stacked cells */
    }
    tbody tr:last-child td {
        border-bottom: none; /* Remove border for the last cell in stacked layout */
    }
    th {
        display: none; /* Hide table headers on smaller screens when cells are stacked */
    }
} 