body {
    background-color: #141414;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    margin: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

.homemain {
    min-height: 100vh;
    padding-top: 100px;
}

.topbar {
    padding: 2rem 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.heading {
    font-family: 'Bangers', sans-serif;
    font-size: 36px;
    letter-spacing: 3px;
    color: #E50914;
    margin: 0;
}

.sorter {
    background: #111111;
    border: 1.5px solid #E50914;
    color: #ffffff;
    font-weight: 700;
    padding: 9px 14px;
    font-size: 14px;
    border-radius: 4px;
}

.rows-container {
    padding: 0 0 80px;
}

.row-section {
    margin-bottom: 40px;
}

.row-heading {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 15px 4%;
}

.row-section:hover .row-heading {
    color: #E50914;
}

.row-loading {
    color: #A3A3A3;
    font-size: 14px;
    padding: 20px 4%;
    margin: 0;
}

.row-error {
    color: #ff4d4d;
    font-size: 14px;
    padding: 20px 4%;
    margin: 0;
    background: rgba(255, 77, 77, 0.1);
    border-left: 4px solid #ff4d4d;
}

.anime-row {
    display: flex;
    overflow-x: auto;
    padding: 0 4% 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.anime-row::-webkit-scrollbar {
    display: none;
}

.anime-card {
    min-width: 180px;
    width: 180px;
    background: #181818;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    margin-right: 16px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.anime-card:hover {
    background: #222;
    transform: translateY(-8px);
}

.anime-card img {
    width: 100%;
    height: 250px;
    display: block;
}

.anime-card:hover img {
    opacity: 0.8;
}

.anime-title {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    padding: 12px 10px;
    margin: 0;
    background: black;
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 4%;
    }

    .heading {
        font-size: 28px;
    }

    .row-heading {
        font-size: 18px;
    }

    .anime-card {
        min-width: 140px;
        width: 140px;
    }

    .anime-card img {
        height: 200px;
    }

    .sorter {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .heading {
        font-size: 22px;
    }

    .row-heading {
        font-size: 16px;
    }

    .anime-card {
        min-width: 120px;
        width: 120px;
    }

    .anime-card img {
        height: 170px;
    }

    .anime-title {
        font-size: 11px;
        padding: 8px 6px;
    }
}

.btnfav {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    background: rgba(0, 0, 0, 0.75);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.theme-toggle {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    padding: 6px 14px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
}

.theme-toggle:hover {
    border-color: #ffffff;
}

body.light-mode {
    background-color: #f0f0f0;
    color: #111111;
}

body.light-mode .navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
}

body.light-mode .theme-toggle {
    border-color: rgba(0, 0, 0, 0.4);
    color: #111111;
}

body.light-mode .theme-toggle:hover {
    border-color: #111111;
}

body.light-mode .row-heading {
    color: #111111;
}

body.light-mode .row-loading {
    color: #555555;
}

body.light-mode .anime-card {
    background: #e0e0e0;
}

body.light-mode .anime-card:hover {
    background: #d0d0d0;
}

body.light-mode .anime-title {
    background: #ffffff;
    color: #111111;
}

body.light-mode .sorter {
    background: #ffffff;
    color: #111111;
    border-color: #E50914;
}

body.light-mode .footer {
    background: #e8e8e8;
}

body.light-mode .tagline {
    color: #555555;
}

body.light-mode .footerbottom p {
    color: #555555;
}

body.light-mode .footerlinks a {
    color: #555555;
}

body.light-mode .badge {
    color: #555555;
    border-color: #cccccc;
}

body.light-mode .card {
    background: #e0e0e0;
    border-color: #cccccc;
}

body.light-mode .title {
    color: #111111;
}

body.light-mode .emptymsg {
    color: #444444;
}

body.light-mode .logotext {
    color: #f97316;
}