html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
    font-family: Arial, sans-serif; /* Ensure font is applied */
}

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

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f4f4f4;
    min-height: 100vh;
}

/* Styles for header */
.header {
    background-color: #f8f8f8;
    padding: 20px;
    text-align: center;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.header p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

/* Main content styles */
#main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    padding: 20px; /* Ensure content has some spacing */
    box-sizing: border-box;
}

#content {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    #content {
        max-width: 30%;
    }
}

/* Generic styles for all input fields */
input[type="text"], input[type="search"], input[type="email"], input[type="password"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    width: calc(100% - 130px); /* Adjust input width to fit within container */
    box-sizing: border-box;
}

/* Generic styles for all buttons */
button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    width: 100%; /* Ensure it fits within its parent */
    box-sizing: border-box;
}

#list-container {
    max-width: 100%;
    width: 100%;
}

.item {
    margin-bottom: 10px;
}

.item-title {
    cursor: pointer;
    font-weight: bold;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-title .emoji {
    margin-right: 10px;
}

.item-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-top: none;
    background-color: #fff;
}

.item-content.show {
    max-height: 400px; /* Adjust based on your content */
    padding: 10px;
}

hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #ccc;
}

img {
    max-height: 200px;
}

#errorMessage {
    color: red;
    font-weight: bold;
}

.header, .footer {
    text-align: center;
    padding: 20px;
    background-color: #f1f1f1;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer p {
    margin: 0;
    font-size: 14px;
}

.footer a {
    color: #0066cc;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
