/* Core Variable Design Tokens - Midnight Aurora Obsidian (Premium Rich Dark Neon) */
:root {
    --bg-color: #080a13;
    --card-bg: rgba(15, 20, 38, 0.72);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #8f57ff;
    --accent-primary-glow: rgba(143, 87, 255, 0.18);
    --accent-secondary: #00f2fe;
    
    /* Brand Neon Glowing Colors */
    --brand-ali: #a259ff;
    --brand-quark: #00f2a1;
    --brand-baidu: #008bff;
    --brand-xunlei: #00e5ff;
    --brand-unknown: #ff007f;

    --font-heading: 'Outfit', 'Noto Sans SC', sans-serif;
    --font-body: 'Outfit', 'Noto Sans SC', sans-serif;
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Stunning Radial Glow Backgrounds - Cosmic Aurora Auras */
.glow-bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    width: 55vw;
    height: 55vw;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.22;
    animation: pulse 15s infinite alternate ease-in-out;
}

.circle-purple {
    top: -15vw;
    right: -10vw;
    background: radial-gradient(circle, rgba(143, 87, 255, 0.5) 0%, rgba(255, 0, 127, 0.2) 60%, transparent 80%);
}

.circle-blue {
    bottom: -15vw;
    left: -10vw;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.5) 0%, rgba(0, 139, 255, 0.2) 60%, transparent 80%);
    animation-delay: -7.5s;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0px, 0px); }
    100% { transform: scale(1.15) translate(30px, 20px); }
}

/* Main Container Layout */
.app-container {
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Aesthetics */
.main-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #a259ff, #00f2fe, #ff007f);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 12px rgba(143, 87, 255, 0.35));
}

.main-header h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: -1px;
}

.main-header h1 span {
    background: linear-gradient(135deg, #8f57ff, #00f2fe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Premium Search Bar Section - Neon Glow border */
.search-section {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.search-form-wrapper {
    width: 100%;
    max-width: 800px;
}

.input-glow-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.35rem 0.35rem 0.35rem 1.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.input-glow-wrapper:focus-within {
    border-color: rgba(143, 87, 255, 0.5);
    box-shadow: 0 0 25px rgba(143, 87, 255, 0.22),
                inset 0 0 10px rgba(0, 242, 254, 0.05);
}

.search-bar-icon {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-right: 1rem;
}

.input-glow-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-body);
    width: 100%;
}

.input-glow-wrapper input::placeholder {
    color: #475569;
    font-weight: 400;
}

.input-glow-wrapper button {
    background: linear-gradient(135deg, #8f57ff 0%, #00f2fe 100%);
    border: none;
    outline: none;
    color: white;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(143, 87, 255, 0.25);
}

.input-glow-wrapper button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(143, 87, 255, 0.45), 0 0 10px rgba(0, 242, 254, 0.2);
}

.input-glow-wrapper button:active {
    transform: scale(0.98);
}

/* Quick Hot-Tags */
.quick-tags {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-tag-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tag-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 0.3rem 0.85rem;
    border-radius: 30px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tag-btn:hover {
    color: white;
    background: linear-gradient(135deg, #8f57ff, #00f2fe);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(143, 87, 255, 0.3);
}

/* Results Main Area Grid layouts */
.results-main-area {
    flex: 1;
    width: 100%;
}

.results-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

/* Glassmorphism Panel styles - extremely high-end obsidian borders */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(24px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Empty State Card styling */
.empty-state-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #8f57ff, #00f2fe, #ff007f);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(143, 87, 255, 0.3));
    margin-bottom: 0.5rem;
}

.empty-state-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

.empty-state-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

.animate-bounce {
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* Notice Boards */
.notice-board-container {
    margin-bottom: 2rem;
    animation: fadeInDown 0.4s ease;
}

.notice-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid var(--accent-primary);
    padding: 1.25rem 1.5rem;
    background: rgba(18, 22, 41, 0.85);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.notice-icon {
    font-size: 1.2rem;
    color: var(--accent-secondary);
    margin-top: 0.15rem;
}

.notice-content {
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: pre-line;
}

/* Premium Movie Resource Cards - Neon border hover */
.movie-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    width: 100%;
    box-sizing: border-box;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(143, 87, 255, 0.45);
    box-shadow: 0 12px 35px rgba(143, 87, 255, 0.18),
                0 0 10px rgba(0, 242, 254, 0.15);
}

.movie-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.movie-card-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Highly Unified drive badges - Vivid Neon Glowing styled */
.drive-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 30px;
    text-transform: uppercase;
}

.badge-ali {
    background: rgba(162, 89, 255, 0.08);
    border: 1px solid rgba(162, 89, 255, 0.3);
    color: #c084fc;
    text-shadow: 0 0 10px rgba(162, 89, 255, 0.3);
}

.badge-quark {
    background: rgba(0, 242, 161, 0.08);
    border: 1px solid rgba(0, 242, 161, 0.3);
    color: #2ecc71;
    text-shadow: 0 0 10px rgba(0, 242, 161, 0.3);
}

.badge-baidu {
    background: rgba(0, 139, 255, 0.08);
    border: 1px solid rgba(0, 139, 255, 0.3);
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(0, 139, 255, 0.3);
}

.badge-xunlei {
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #22d3ee;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.badge-unknown {
    background: rgba(255, 0, 127, 0.08);
    border: 1px solid rgba(255, 0, 127, 0.3);
    color: #f43f5e;
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
}

/* Button Actions inside cards */
.movie-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: rgba(143, 87, 255, 0.08);
    border: 1px solid rgba(143, 87, 255, 0.3);
    color: #c084fc;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8f57ff, #00f2fe);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(143, 87, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Skeleton Loading Grids - Soft wave */
.loading-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.skeleton-line {
    background: linear-gradient(90deg, rgba(255,255,255,0.01) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.01) 75%);
    background-size: 200% 100%;
    animation: loading-wave 1.5s infinite;
    border-radius: 4px;
}

.skeleton-title {
    height: 1.25rem;
    width: 80%;
    margin-bottom: 0.75rem;
}

.skeleton-body {
    height: 0.95rem;
    width: 60%;
    margin-bottom: 1.25rem;
}

.skeleton-bottom {
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1rem;
}

.skeleton-btn {
    flex: 1;
    height: 2.1rem;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.01) 25%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0.01) 75%);
    background-size: 200% 100%;
    animation: loading-wave 1.5s infinite;
}

@keyframes loading-wave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hidden elements utilities */
.hidden {
    display: none !important;
}

/* Toast Alert Message popup */
.toast-wrapper {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 20, 38, 0.95);
    border: 1px solid var(--accent-primary);
    border-radius: 50px;
    padding: 0.75rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideUpFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-icon {
    color: var(--accent-secondary);
    font-size: 1.1rem;
}

#toast-message {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Footer Section styling */
.main-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.main-footer p {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 400;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8f57ff, #00f2fe);
}

/* Premium Filter Sidebar Layout */
.results-main-area:has(#filter-bar:not(.hidden)) {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.filter-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    padding: 1.5rem;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    gap: 1.25rem;
    width: 100%;
    position: sticky;
    top: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    animation: fadeInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.filter-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
    width: 100%;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    align-items: stretch;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    width: 100%;
    text-align: left;
}

.filter-btn i {
    font-size: 0.95rem;
    width: 1.2rem;
    text-align: center;
}

.filter-btn:hover {
    color: white;
    background: rgba(143, 87, 255, 0.12);
    border-color: rgba(143, 87, 255, 0.4);
    transform: translateX(5px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #8f57ff 0%, #00f2fe 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(143, 87, 255, 0.3);
    transform: translateX(5px);
}

/* Responsive viewport Media Queries */
@media (min-width: 769px) and (max-width: 1100px) {
    .results-main-area:has(#filter-bar:not(.hidden)) {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }
    
    .results-grid-container,
    .loading-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 1.5rem 0.75rem;
    }

    .main-header {
        margin-bottom: 1.75rem;
    }

    .logo-icon {
        font-size: 2.1rem;
    }

    .main-header h1 {
        font-size: 2.1rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

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

    .input-glow-wrapper {
        padding: 0.3rem 0.3rem 0.3rem 1.1rem;
    }

    .search-bar-icon {
        font-size: 1rem;
        margin-right: 0.65rem;
    }

    .input-glow-wrapper input {
        font-size: 0.95rem;
    }

    .input-glow-wrapper button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .results-main-area:has(#filter-bar:not(.hidden)) {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .filter-container {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 16px;
        padding: 1rem;
        gap: 0.75rem;
        position: static;
        animation: fadeInUp 0.5s ease both;
    }

    .filter-label {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 0.5rem;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .filter-options {
        flex-direction: row;
        width: calc(100% + 2rem);
        margin: 0 -1rem;
        padding: 0 1rem 4px 1rem;
        gap: 0.6rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-options::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
        width: auto;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 30px;
        gap: 0.4rem;
        white-space: nowrap;
    }

    .filter-btn i {
        font-size: 0.85rem;
        width: auto;
    }

    .filter-btn:hover {
        transform: translateY(-2px);
    }

    .filter-btn.active {
        transform: translateY(-2px);
    }

    .results-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .loading-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .movie-card {
        min-height: 160px;
    }

    /* Mobile Single Row Horizontal Scroll for Hot-Tags */
    .quick-tags {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: calc(100% + 2rem);
        margin: 0 -1rem;
        padding: 0 1rem 4px 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .quick-tags::-webkit-scrollbar {
        display: none;
    }

    .quick-tag-label {
        flex-shrink: 0;
        font-size: 0.8rem;
    }

    .tag-btn {
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }
}
