@font-face {
    font-family: 'Noto Sans SC';
    font-weight: 400;
    font-style: normal;
    font-display: optional;
    src: local('Noto Sans SC Regular'), local('NotoSansSC-Regular'),
         url('/static/fonts/NotoSansSC-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Noto Sans SC';
    font-weight: 500;
    font-style: normal;
    font-display: optional;
    src: local('Noto Sans SC Medium'), local('NotoSansSC-Medium'),
         url('/static/fonts/NotoSansSC-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'Noto Sans SC';
    font-weight: 700;
    font-style: normal;
    font-display: optional;
    src: local('Noto Sans SC Bold'), local('NotoSansSC-Bold'),
         url('/static/fonts/NotoSansSC-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-style: normal;
    font-display: swap;
    src: url('/static/vendor/fontawesome/webfonts/fa-solid-900.woff2') format('woff2');
}

@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
    .show-on-mobile {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    .hide-on-desktop {
        display: none !important;
    }
    .show-on-desktop {
        display: flex !important;
    }
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: #e2e8f0;
    overflow-x: hidden;
}

.site-slogan-bar {
    background: linear-gradient(135deg, #0e6475 0%, #04111e 100%);
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.3);
    min-height: 40px;
}

.navbar {
    background-color: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-height: 60px;
}

@media (min-width: 768px) {
    .navbar {
    padding: 1rem 1.5rem;
    min-height: 72px;
    }
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand a {
    text-decoration: none;
    color: inherit;
}

.navbar-logo {
    color: #f43f5e;
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

@media (min-width: 768px) {
    .navbar-logo {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    }
}

.navbar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

@media (min-width: 768px) {
    .navbar-title {
    font-size: 1.25rem;
    }
}

.navbar-nav {
    display: none;
    align-items: center;
    margin-left: 1.5rem;
    gap: 1rem;
}

@media (min-width: 768px) {
    .navbar-nav {
    display: flex;
    }
}

.navbar-nav a {
    background-color: #475569;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.navbar-nav a:hover {
    background-color: #64748b;
}

.navbar-nav a.active {
    background-color: #f43f5e;
    color: white;
}

.navbar-nav a.active:hover {
    background-color: #e11d48;
}

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

@media (min-width: 768px) {
    .navbar-actions {
    gap: 1rem;
    }
}

.navbar-search {
    display: none;
    align-items: center;
    color: #f43f5e;
    text-decoration: none;
}

@media (min-width: 768px) {
    .navbar-search {
    display: flex;
    }
}

.navbar-search i {
    margin-right: 0.25rem;
}

.dropdown {
    position: relative;
    display: none;
}

.dropdown.language-dropdown {
    display: block;
}

@media (min-width: 768px) {
    .dropdown {
    display: block;
    }
}

.dropdown-toggle {
    background-color: #475569;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.dropdown-toggle:hover {
    background-color: #64748b;
}

.dropdown-toggle i:first-child {
    margin-right: 0.5rem;
}

.dropdown-toggle i:last-child {
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 16rem;
    background-color: #1e293b;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 50;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
    opacity: 0;
    transform: translateY(-10px);
    }

    to {
    opacity: 1;
    transform: translateY(0);
    }
}

.dropdown-header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #475569;
}

.dropdown-header h3 {
    font-weight: 700;
    margin: 0;
    color: white;
}

.dropdown-content {
    max-height: 20rem;
    overflow-y: auto;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #475569;
}

.dropdown-item-content {
    display: flex;
}

.dropdown-item-thumb {
    width: 4rem;
    height: 2.5rem;
    background-color: #64748b;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

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

.dropdown-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.dropdown-item-progress {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

.dropdown-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid #475569;
}

.dropdown-footer a {
    color: #f43f5e;
    font-size: 0.875rem;
    text-decoration: none;
}

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

/* Language Dropdown Specific Styles */
.language-dropdown {
    display: block;
}

.language-dropdown .dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.875rem;
}

.language-dropdown .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-dropdown .dropdown-menu {
    min-width: 10rem;
}

.language-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-dropdown .dropdown-item.active {
    background-color: #f43f5e;
    color: white;
    font-weight: 600;
}

.language-dropdown .dropdown-item.active:hover {
    background-color: #e11d48;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
    display: none;
    }
}

.mobile-menu-btn i {
    font-size: 1.25rem;
}

.mobile-nav {
    display: block;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #1e293b;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 40;
    max-height: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .mobile-nav {
    display: none;
    }
}

.mobile-nav.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    max-height: 500px;
}

.mobile-nav-content {
    margin-top: 2.8rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mobile-nav-links a {
    background-color: #475569;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.mobile-nav-links a:hover {
    background-color: #64748b;
}

.mobile-nav-links a.active {
    background-color: #f43f5e;
    color: white;
}

.mobile-nav-links a.active:hover {
    background-color: #e11d48;
}

.mobile-search {
    position: relative;
}

.mobile-search input {
    width: 100%;
    background-color: #475569;
    color: white;
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border-radius: 9999px;
    border: none;
    outline: none;
}

.mobile-search input:focus {
    ring: 2px solid #f43f5e;
}

.mobile-search button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
}

.mobile-search button:hover {
    color: #f43f5e;
}

.mobile-history {
    color: white;
}

.mobile-history h3 {
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
}

.mobile-history h3 i {
    margin-right: 0.5rem;
}

.mobile-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-history-item {
    display: block;
    padding: 0.5rem;
    background-color: #475569;
    border-radius: 0.5rem;
    text-decoration: none;
    color: white;
    transition: background-color 0.3s ease;
}

.mobile-history-item:hover {
    background-color: #64748b;
}

.mobile-history-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.mobile-history-item-progress {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 767px) {
    .auth-buttons {
    display: none;
    }
}

.auth-btn {
    background-color: #475569;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background-color: #64748b;
    transform: translateY(-1px);
}

.auth-btn.login-btn {
    background-color: #f43f5e;
}

.auth-btn.login-btn:hover {
    background-color: #e11d48;
}

.auth-btn.register-btn {
    background-color: #3b82f6;
}

.auth-btn.register-btn:hover {
    background-color: #2563eb;
}

.user-avatar-toggle {
    padding: 0.25rem 0.75rem;
    background-color: #475569;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar-toggle:hover {
    background-color: #64748b;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f43f5e;
}

.user-dropdown .dropdown-menu {
    width: 12rem;
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-dropdown .dropdown-item i {
    width: 1rem;
    text-align: center;
}

@media (max-width: 767px) {
    .user-dropdown {
    display: none;
    }
}

.mobile-auth {
    margin-bottom: 1rem;
}

.mobile-auth-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-auth-btn {
    flex: 1;
    background-color: #475569;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mobile-auth-btn:hover {
    background-color: #64748b;
}

.mobile-auth-btn:first-child {
    background-color: #f43f5e;
}

.mobile-auth-btn:first-child:hover {
    background-color: #e11d48;
}

.mobile-auth-btn:last-child {
    background-color: #3b82f6;
}

.mobile-auth-btn:last-child:hover {
    background-color: #2563eb;
}

.mobile-user-info {
    background-color: #475569;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f43f5e;
    margin-right: 0.75rem;
}

.mobile-user-name {
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
}

.mobile-logout-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mobile-logout-btn:hover {
    background-color: #dc2626;
}

@media (max-width: 768px) {
    .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
    }

    .mobile-text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
    }

    .mobile-text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
    }
}

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #1e293b;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from {
    opacity: 0;
    }

    to {
    opacity: 1;
    }
}

@keyframes slideIn {
    from {
    transform: translateY(-50px);
    opacity: 0;
    }

    to {
    transform: translateY(0);
    opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #475569;
}

.modal-header h2 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: white;
    background-color: #475569;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    background-color: #475569;
    color: white;
    border: 1px solid #64748b;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #f43f5e;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #f43f5e;
    color: white;
}

.btn-primary:hover {
    background-color: #e11d48;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #475569;
    color: white;
}

.btn-secondary:hover {
    background-color: #64748b;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
}

.form-footer p {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
}

.form-footer a {
    color: #f43f5e;
    text-decoration: none;
    font-weight: 500;
}

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

.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.poster-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.poster-container:hover {
    transform: translateY(-5px);
}

.poster-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    pointer-events: none;
}

.type-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(244, 63, 94, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 10;
    transition: all 0.3s ease;
}

.hd-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.3s ease;
}

.year-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.region-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.cast-scroll {
    scrollbar-width: thin;
    scrollbar-color: #f43f5e #1e293b;
}

.cast-scroll::-webkit-scrollbar {
    height: 6px;
}

.cast-scroll::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 10px;
}

.cast-scroll::-webkit-scrollbar-thumb {
    background: #f43f5e;
    border-radius: 10px;
}

.play-btn {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.3);
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(244, 63, 94, 0.4);
}

.mobile-text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.mobile-text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.mobile-text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.mobile-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-height: 3rem;
}

.mobile-btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    min-height: 2.6rem;
}

@media (max-width: 768px) {
    .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
    }

    .mobile-mb-4 {
    margin-bottom: 1rem;
    }

    .mobile-mb-6 {
    margin-bottom: 1.5rem;
    }

    .mobile-py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    }

    .mobile-gap-3 {
    gap: 0.75rem;
    }
}

.h-title {
    height: 1.5em;
}

.hidden {
    display: none;
}
