*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #050816;
    color: #f5f5f5;
}

a {
    color: #4ea1ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 10px 24px;
    background: rgba(5, 8, 22, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-right: 24px;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-right: auto;
}

.nav-tab {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: #cbd5f5;
    transition: all 0.18s ease;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
    background: linear-gradient(135deg, #4ea1ff, #9b5bff);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(158, 189, 255, 0.4);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.search-bar input {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(4, 9, 33, 0.9);
    color: #f5f5f5;
    min-width: 180px;
}

.search-bar input:focus {
    outline: none;
    border-color: #4ea1ff;
}

.search-bar button {
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #4ea1ff, #4fd1c5);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.search-bar button:hover {
    filter: brightness(1.05);
}

.app-main {
    flex: 1;
    padding: 16px 24px 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.hero {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: radial-gradient(circle at top left, #1f2937, #020617);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-text h1 {
    margin: 0 0 6px;
    font-size: 22px;
}

.hero-text p {
    margin: 0;
    font-size: 14px;
    color: #cbd5f5;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 8px;
    font-size: 14px;
}

.muted {
    color: #9ca3af;
    margin-left: 8px;
}

.toolbar-right select {
    background: #020617;
    color: #e5e7eb;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    padding: 4px 10px;
}

.message-bar {
    margin: 8px 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.message-bar.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.message-bar.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.6);
}

.hidden {
    display: none;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.card {
    background: radial-gradient(circle at top, #111827, #020617);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.9);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
    border-color: rgba(96, 165, 250, 0.9);
}

.card-cover {
    position: relative;
    padding-top: 56.25%;
    background: #111827;
}

.card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d1b4e 100%);
}

.card-cover-placeholder svg {
    width: 48%;
    height: auto;
    opacity: 0.9;
}

.card-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
}

.card-body {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    max-height: 3.1em;
    overflow: hidden;
}

.card-meta {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    justify-content: space-between;
}

.card-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

.btn-play {
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #111827;
}

.btn-play:hover {
    filter: brightness(1.05);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 14px;
}

.pagination button {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: #020617;
    color: #e5e7eb;
    cursor: pointer;
}

.pagination button[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.app-footer {
    padding: 14px 24px;
    font-size: 13px;
    color: #9ca3af;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    background: #020617;
    text-align: center;
}

@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-bar {
        width: 100%;
        justify-content: flex-start;
    }

    .search-bar input {
        flex: 1;
        min-width: 0;
    }
}

