:root {
    --primary-red: #dc2626;
    --dark-red: #b91c1c;
    --light-red: #fecaca;
    --bg-light: #ffffff;
    --bg-dark: #0a0a0a;
    --text-light: #1f2937;
    --text-dark: #f3f4f6;
    --card-light: #f8fafc;
    --card-dark: #2a2a2a;
    --border-light: #e5e7eb;
    --border-dark: #374151;
    --sidebar-light: #f1f5f9;
    --sidebar-dark: #111827;
    --gradient: linear-gradient(135deg, #dc2626, #b91c1c, #991b1b);
}

[data-theme="light"] {
    --bg-color: var(--bg-light);
    --text-color: var(--text-light);
    --card-bg: var(--card-light);
    --border-color: var(--border-light);
    --sidebar-bg: var(--sidebar-light);
}

[data-theme="dark"] {
    --bg-color: var(--bg-dark);
    --text-color: var(--text-dark);
    --card-bg: var(--card-dark);
    --border-color: var(--border-dark);
    --sidebar-bg: var(--sidebar-dark);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    line-height: 1.6;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

[data-theme="dark"] body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.navbar {
    background: var(--gradient);
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.theme-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-light);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border-light);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .modal-content {
    background-color: var(--card-dark);
    border-color: var(--border-dark);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.5rem;
    text-align: center;
}

[data-theme="dark"] .modal-content h2 {
    color: var(--text-dark);
}

.modal-content input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: 0.5rem;
    background-color: var(--bg-light);
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

[data-theme="dark"] .modal-content input {
    border-color: var(--border-dark);
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.modal-content button {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.3s;
}

.modal-content button:hover {
    transform: translateY(-2px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-red);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    padding: 0.25rem;
    border-radius: 50%;
    line-height: 1;
}

[data-theme="dark"] .close-btn {
    color: var(--text-dark);
}

.close-btn:hover {
    color: var(--primary-red);
    background: rgba(220, 38, 38, 0.1);
}

.my-list-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.my-list-content::-webkit-scrollbar {
    width: 6px;
}

.my-list-content::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 3px;
}

[data-theme="dark"] .my-list-content::-webkit-scrollbar-track {
    background: var(--border-dark);
}

.my-list-content::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

.mylist-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
}

[data-theme="dark"] .mylist-item {
    border-bottom-color: var(--border-dark);
    background: var(--bg-dark);
}

.mylist-item:hover {
    background: var(--card-light);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

[data-theme="dark"] .mylist-item:hover {
    background: var(--card-dark);
}

.mylist-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mylist-cover {
    width: 70px;
    height: 95px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-right: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.mylist-info {
    flex: 1;
    min-width: 0;
}

.mylist-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mylist-title:hover {
    color: var(--primary-red);
}

.mylist-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.watch-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.watch-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.remove-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

.empty-mylist {
    text-align: center;
    padding: 3rem 1.25rem;
    color: var(--text-light);
    opacity: 0.7;
    font-size: 1.1rem;
}

[data-theme="dark"] .empty-mylist {
    color: var(--text-dark);
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    position: relative;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../assets/banner.gif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 2rem;
    border-radius: 1.5rem;
    margin-bottom: 3rem;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0.5;
    z-index: 1;
}

.history-section {
    margin-bottom: 3rem;
}

.history-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 600;
}

[data-theme="dark"] .history-section h3 {
    color: var(--text-dark);
}

.history-container {
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) var(--border-light);
}

[data-theme="dark"] .history-container {
    scrollbar-color: var(--primary-red) var(--border-dark);
}

.history-container::-webkit-scrollbar {
    height: 6px;
}

.history-container::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 3px;
}

[data-theme="dark"] .history-container::-webkit-scrollbar-track {
    background: var(--border-dark);
}

.history-container::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

.history-list {
    display: flex;
    gap: 1.25rem;
    min-width: min-content;
}

.history-item {
    flex: 0 0 auto;
    width: 200px;
    background-color: var(--card-light);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    position: relative;
}

[data-theme="dark"] .history-item {
    background-color: #000;
    border-color: var(--border-dark);
}

.history-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.25);
    border-color: var(--primary-red);
}

.history-cover {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.history-info {
    padding: 0.75rem;
}

.history-title {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .history-title {
    color: var(--text-dark);
}

.history-episode {
    font-size: 0.8rem;
    opacity: 0.8;
    color: var(--primary-red);
    font-weight: 500;
}

.history-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary-red) 80%, var(--card-light) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(220,38,38,0.18);
}

[data-theme="dark"] .history-close {
    background: linear-gradient(135deg, var(--primary-red) 80%, var(--card-dark) 100%);
}

.history-item:hover .history-close {
    opacity: 1;
    transform: scale(1.1);
}

.history-close:hover {
    background: var(--primary-red);
    transform: scale(1.2);
}

.my-list-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.my-list-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.search-section {
    margin-bottom: 3rem;
}

.search-container {
    position: relative;
    width: 100%;
}

#searchInput {
    width: 100%;
    padding: 1rem 4rem 1rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 0.75rem;
    background-color: var(--card-light);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

[data-theme="dark"] #searchInput {
    border-color: var(--border-dark);
    background-color: var(--card-dark);
    color: var(--text-dark);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.content-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.sidebar {
    background: var(--card-light);
    padding: 1.5rem;
    border-radius: 1rem;
    height: fit-content;
    position: sticky;
    top: 120px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid var(--border-light);
}

[data-theme="dark"] .sidebar {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.sidebar h3 {
    margin-bottom: 1.25rem;
    color: var(--primary-red);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.redesigned-recommendation {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.8rem 1rem 0.8rem 0.6rem;
    background: var(--card-light);
    border-radius: 1rem;
    box-shadow: 0 4px 18px rgba(220,38,38,0.10);
    border: 1.5px solid var(--border-light);
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
    position: relative;
    min-width: 0;
}
[data-theme="dark"] .redesigned-recommendation {
    background: var(--card-dark);
    border-color: var(--border-dark);
}
.redesigned-recommendation:hover {
    box-shadow: 0 8px 32px rgba(220,38,38,0.18);
    border-color: var(--primary-red);
    transform: translateY(-2px) scale(1.02);
}
.recommended-cover-container {
    position: relative;
    min-width: 70px;
    max-width: 70px;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.recommended-cover {
    width: 70px;
    height: 95px;
    object-fit: cover;
    border-radius: 0.6rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    background: #fff;
}
.recommended-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}
[data-theme="dark"] .recommended-title {
    color: #fff;
}
.recommended-title {
    font-weight: 900;
    font-size: 1.18rem;
    color: var(--primary-red);
    margin-bottom: 0.12rem;
    line-height: 1.22;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[data-theme="dark"] .recommended-title {
    color: #fff;
}
.recommended-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.18rem;
    margin-bottom: 0.12rem;
}
.genre-pill {
    background: var(--primary-red);
    color: #fff;
    padding: 0.12rem 0.45rem;
    border-radius: 0.8rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 1px 4px rgba(220,38,38,0.10);
    transition: background 0.3s;
}
.recommended-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 0.5rem;
    background: var(--gradient);
    color: #fff;
    display: inline-block;
    width: fit-content;
    margin-top: 0.08rem;
    letter-spacing: 0.4px;
}

.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommended-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    min-height: 80px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .recommended-item {
    background-color: var(--bg-dark);
    border-color: var(--border-dark);
}

.recommended-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recommended-item:hover {
    transform: translateX(5px);
    border-color: var(--primary-red);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

.recommended-item:hover::before {
    opacity: 1;
}

.recommended-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.recommended-item:hover .recommended-cover {
    transform: scale(1.05);
}

.recommended-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.recommended-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--text-light);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.2em;
    transition: color 0.3s ease;
}

[data-theme="dark"] .recommended-title {
    color: var(--text-dark);
}

.recommended-item:hover .recommended-title {
    color: var(--primary-red);
}

.recommended-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    display: inline-block;
    width: fit-content;
}

.status-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    position: relative;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-red);
    background: transparent;
    color: var(--primary-red);
    border-radius: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover::before, .filter-btn.active::before {
    left: 0;
}

.filter-btn:hover, .filter-btn.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.filter-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.filter-btn.disabled::before {
    display: none;
}

.filter-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    color: var(--primary-red);
}

.filter-count {
    margin-left: 0.5rem;
    background: var(--gradient);
    color: white;
    border-radius: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.8em;
    font-weight: bold;
}

.filter-btn.disabled .filter-count {
    background: var(--border-light);
    color: var(--text-light);
}

[data-theme="dark"] .filter-btn.disabled .filter-count {
    background: var(--border-dark);
    color: var(--text-dark);
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.anime-card {
    background-color: var(--card-light);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.4s ease;
    border: 1px solid var(--border-light);
    position: relative;
    animation: fadeInUp 0.6s ease;
}

[data-theme="dark"] .anime-card {
    background-color: #000;
    border-color: var(--border-dark);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anime-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.25);
    border-color: var(--primary-red);
}

.anime-cover-container {
    position: relative;
    overflow: hidden;
}

.anime-cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.4s ease;
    cursor: pointer;
}

.anime-card:hover .anime-cover {
    transform: scale(1.05);
}

.overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 3rem 0.75rem 0.75rem;
    color: white;
    transform: translateY(100%);
    transition: all 0.4s ease;
}

.anime-card:hover .overlay-info {
    transform: translateY(0);
}

.overlay-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.4em;
    letter-spacing: 0.3px;
}

.overlay-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.overlay-genres .genre-tag {
    background: rgba(220, 38, 38, 0.8);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overlay-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: bold;
}

.favorite-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.7);
    border: none;
    color: gold;
    font-size: 1.1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
    backdrop-filter: blur(10px);
}

.favorite-btn.in-list {
    background: gold;
    color: black;
    transform: scale(1.1);
}

.favorite-btn:hover {
    transform: scale(1.2);
    background: rgba(0,0,0,0.9);
}

.favorite-btn.in-list:hover {
    background: #ffd700;
    transform: scale(1.3);
}

.anime-info {
    padding: 0.75rem;
    cursor: pointer;
}

.anime-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.6em;
    letter-spacing: 0.3px;
}

[data-theme="dark"] .anime-title {
    color: var(--text-dark);
}

.genre-tags,
.status-badge {
    display: none;
}

.status-ANIME {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
}

.status-MOVIE {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    color: white;
}

.status-RANDOM {
    background: linear-gradient(45deg, #10b981, #047857);
    color: white;
}

.status-MYLIST {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
}

.page-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 600;
}

.page-btn:hover:not(:disabled) {
    background: var(--dark-red);
    transform: translateY(-2px);
}

.page-btn:disabled {
    background: var(--card-light);
    color: #6b7280;
    cursor: not-allowed;
    transform: none;
}

[data-theme="dark"] .page-btn:disabled {
    background: var(--card-dark);
    color: #9ca3af;
}

.page-info {
    color: var(--text-light);
    font-weight: bold;
    font-size: 1rem;
}

[data-theme="dark"] .page-info {
    color: var(--text-dark);
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    gap: 1rem;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-red);
    border-radius: 8px;
    animation: box-spin 1s linear infinite;
    box-sizing: border-box;
    background: transparent;
}

[data-theme="dark"] .loading-spinner {
    border: 3px solid var(--border-dark);
}

@keyframes box-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results, .no-recommendations, .empty-history {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--text-light);
    opacity: 0.7;
    font-size: 1rem;
    grid-column: 1 / -1;
}

[data-theme="dark"] .no-results,
[data-theme="dark"] .no-recommendations,
[data-theme="dark"] .empty-history {
    color: var(--text-dark);
}

.featured-indicator {
    color: gold;
    font-size: 0.8rem;
}

.mylist-search-container {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
}

.mylist-search-input {
    width: 100%;
    padding: 0.75rem 3.5rem 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 0.5rem;
    background-color: var(--bg-light);
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

[data-theme="dark"] .mylist-search-input {
    border-color: var(--border-dark);
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.mylist-search-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.mylist-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
}

.mylist-search-btn:hover {
    background: var(--dark-red);
    transform: translateY(-50%) scale(1.05);
}

.mylist-items {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.mylist-items::-webkit-scrollbar {
    width: 6px;
}

.mylist-items::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 3px;
}

[data-theme="dark"] .mylist-items::-webkit-scrollbar-track {
    background: var(--border-dark);
}

.mylist-items::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

.recommended-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--gradient);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.recommended-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.recommended-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #f59e0b;
}

.recommended-episodes {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-red);
    background: rgba(220, 38, 38, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 0.2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    position: relative;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

[data-theme="dark"] .section-title {
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 1px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.4;
}

.card-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.card-meta {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.8;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-ongoing {
    background: linear-gradient(45deg, #10b981, #047857);
    color: white;
}

.status-completed {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    color: white;
}

.status-upcoming {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
}

.status-hiatus {
    background: linear-gradient(45deg, #6b7280, #4b5563);
    color: white;
}