body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    direction: rtl;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

header {
    background-color: #0073e6;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

.search-section {
    margin: 20px auto;
    max-width: 600px;
    display: flex;
    position: relative;
    gap: 10px;
}

#searchInput {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#searchButton,
#themeToggle {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#searchButton:hover,
#themeToggle:hover {
    background-color: #005bb5;
}

body.dark-mode #searchButton,
body.dark-mode #themeToggle {
    background-color: #1e88e5;
    color: #ffffff;
}

body.dark-mode #searchButton:hover,
body.dark-mode #themeToggle:hover {
    background-color: #1565c0;
}

#resultsList {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 600px;
    background: white;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 4px;
    position: absolute;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode #resultsList {
    background: #1e1e1e;
    color: #e0e0e0;
}

#resultsList li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    cursor: pointer;
}

body.dark-mode #resultsList li {
    border-bottom: 1px solid #333;
}

#resultsList li:last-child {
    border-bottom: none;
}

#resultsList li:hover {
    background: #f0f0f0;
}

body.dark-mode #resultsList li:hover {
    background: #333;
}

#resultsList img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    margin-left: 10px;
    border-radius: 4px;
}

.anime-details-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 20px auto;
    max-width: 1200px;
    padding: 20px;
}

.anime-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode .anime-card {
    background: #1e1e1e;
    color: #e0e0e0;
}

.anime-header {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px;
}

body.dark-mode .anime-header {
    border-bottom: 1px solid #333;
}

.anime-cover {
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.anime-title-section {
    padding: 0 20px;
    flex: 1;
}

.anime-title {
    font-size: 20px;
    margin: 0 0 10px;
    color: inherit;
}

.anime-title-english,
.anime-title-native {
    font-size: 16px;
    color: #666;
    margin: 5px 0;
}

body.dark-mode .anime-title-english,
body.dark-mode .anime-title-native {
    color: #aaa;
}

.anime-details {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

body.dark-mode .anime-details {
    border-top: 1px solid #333;
}

.anime-details p {
    margin: 10px 0;
    color: inherit;
    line-height: 1.6;
}

.anime-description {
    margin-top: 10px;
    font-style: italic;
}

.anime-trailer {
    padding: 20px;
    text-align: center;
}

.anime-trailer iframe {
    border-radius: 8px;
    width: 100%;
    max-width: 560px;
}

.anime-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.anime-extra div {
    background: #f0f0f0;
    border-radius: 4px;
    padding: 10px;
    font-size: 14px;
}

body.dark-mode .anime-extra div {
    background: #333;
    color: #ddd;
}

footer {
    margin-top: auto;
    background-color: #0073e6;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

footer .content {
    position: relative;
    z-index: 2;
}

footer .content h1 {
    font-size: 2rem;
    margin: 0;
    animation: glow 2s infinite alternate;
}

footer .content p {
    font-size: 1.2rem;
    margin: 10px 0 20px;
}

footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

footer .social-icons a {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
}

footer .sakura {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('https://i.imgur.com/x1zX4cn.png') repeat;
    opacity: 0.2;
    animation: fall 10s linear infinite;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #fff, 0 0 20px #ff66cc, 0 0 30px #ff66cc;
    }
    to {
        text-shadow: 0 0 20px #fff, 0 0 30px #ff66cc, 0 0 40px #ff66cc;
    }
}

@keyframes fall {
    to {
        background-position: 0 100%;
    }
}

/* Media queries for responsiveness */
@media screen and (max-width: 768px) {
    .search-section {
        flex-direction: column;
        gap: 5px;
    }

    #searchInput {
        width: 100%;
    }

    #searchButton,
    #themeToggle {
        width: 100%;
    }

    .anime-header {
        flex-direction: column;
        align-items: center;
    }

    .anime-cover {
        margin-bottom: 10px;
    }

    .anime-title-section {
        text-align: center;
        padding: 0;
    }

    .anime-trailer iframe {
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }

    #searchButton,
    #themeToggle {
        font-size: 14px;
        padding: 8px;
    }

    .anime-title {
        font-size: 18px;
