:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 20px;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.15) 0px, transparent 50%);
}

.container {
    max-width: 800px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

p.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Card layout for index */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.3);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    align-items: center;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

.card-footer svg {
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.card:hover .card-footer svg {
    transform: translateX(4px);
}

/* Article Styles */
.article-header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}

.back-link svg {
    margin-right: 8px;
}

.alert {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

.alert svg {
    flex-shrink: 0;
    margin-right: 12px;
    margin-top: 2px;
}

.section-title {
    font-size: 1.3rem;
    margin: 30px 0 15px;
    color: #818cf8;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

.tutorial-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.tutorial-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

/* Source Lists */
.source-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.source-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    backdrop-filter: blur(12px);
}

@media (min-width: 640px) {
    .source-item {
        flex-direction: row;
        align-items: center;
    }
}

.source-info {
    flex-grow: 1;
}

.source-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.source-url {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-all;
    font-family: monospace;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.btn-copy.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #34d399;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Password Gate */
#password-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 42vh;
    width: 100%;
    max-width: 440px;
    margin: 60px auto;
    padding: 50px 35px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    text-align: center;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

#password-gate h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(to right, #a5b4fc, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#password-gate p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.pw-input-group {
    display: flex;
    width: 100%;
    gap: 12px;
    margin-bottom: 12px;
}

#pw-input {
    flex-grow: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#pw-input:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: rgba(15, 23, 42, 0.8);
}

#pw-submit {
    background: linear-gradient(to right, #818cf8, #3b82f6);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#pw-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.4);
}

#pw-submit:active {
    transform: translateY(1px);
}

#pw-error {
    color: #f87171;
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 10px;
    display: none;
}

/* Pulsing Live Badge */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.8rem;
    color: #34d399;
    font-weight: 600;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.05);
    margin-top: 4px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.live-dot::after {
    content: '';
    width: 100%;
    height: 100%;
    background-color: #10b981;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: pulse-live 1.8s infinite ease-in-out;
}

@keyframes pulse-live {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

#main-content {
    transition: opacity 0.3s ease;
}

/* Netdisk Grid Layout */
.netdisk-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 10px;
}

@media (min-width: 640px) {
    .netdisk-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.netdisk-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.netdisk-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.3);
}

.netdisk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.netdisk-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.netdisk-btn-quark {
    background: linear-gradient(to right, #00c2ff, #008cb3);
}

.netdisk-btn-baidu {
    background: linear-gradient(to right, #06a7ff, #007bbd);
}

.netdisk-icon-box {
    border-radius: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 1.2rem;
}

.netdisk-icon-quark {
    background: rgba(0, 194, 255, 0.1);
    border: 1px solid rgba(0, 194, 255, 0.2);
    color: #00c2ff;
}

.netdisk-icon-baidu {
    background: rgba(6, 167, 255, 0.1);
    border: 1px solid rgba(6, 167, 255, 0.2);
    color: #06a7ff;
}

/* IPTV Group Badges */
.group-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.group-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.group-badge:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.badge-green {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.badge-yellow {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.badge-red {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}


