:root {
    --primary-color: #4a89dc;
    --secondary-color: #5d9cec;
    --danger-color: #da4453;
    --success-color: #8cc152;
    --warning-color: #f6bb42;
    --info-color: #3bafda;
    --light-color: #f5f7fa;
    --dark-color: #434a54;
    --gray-color: #666;
    --border-color: #e6e9ed;
    --text-color: #333;
    --bg-color: #fff;
    --card-bg: #fff;
    --header-bg: #f5f7fa;
    --footer-bg: #f5f7fa;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --grid-bg-color: rgba(0, 0, 0, 0.03);
}

/* 夜间模式 */
[data-theme="dark"] {
    --primary-color: #5d9cec;
    --secondary-color: #4a89dc;
    --danger-color: #ed5565;
    --success-color: #a0d468;
    --warning-color: #ffce54;
    --info-color: #4fc1e9;
    --light-color: #656d78;
    --dark-color: #f5f7fa;
    --gray-color: #ccd1d9;
    --grid-bg-color: rgba(255, 255, 255, 0.03);
    --border-color: #656d78;
    --text-color: #f5f7fa;
    --bg-color: #2f3640;
    --card-bg: #353b48;
    --header-bg: #2f3640;
    --footer-bg: #2f3640;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image:
        linear-gradient(var(--grid-bg-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-bg-color) 1px, transparent 1px);
    background-size: 40px 40px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 60px);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-bg);
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.site-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    margin-left: -5px;
}

.site-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0;
    display: block;
    margin-right: -4px;
    transform: translateY(3px);
}

header h1 {
    margin: 0;
    background: linear-gradient(90deg, #cc5500 0%, #ff8c33 25%, #cc5500 50%, #ff8c33 75%, #cc5500 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 32px;
    font-weight: 800;
    animation: shimmer 3s linear infinite;
    position: relative;
    display: inline-block;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

[data-theme="dark"] header h1 {
    background: linear-gradient(90deg, #cc7700 0%, #ffb366 25%, #cc7700 50%, #ffb366 75%, #cc7700 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .site-brand {
        gap: 4px;
        justify-content: center;
    }

    .site-logo {
        width: 50px;
        height: 50px;
        border-radius: 0;
        margin-right: -5px;
        transform: translateY(3px);
    }

    .site-brand-text {
        margin-left: -4px;
    }

    header h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .site-brand {
        gap: 3px;
    }

    .site-logo {
        width: 44px;
        height: 44px;
        border-radius: 0;
        margin-right: -3px;
        transform: translateY(2px);
    }

    .site-brand-text {
        margin-left: -3px;
    }

    header h1 {
        font-size: 26px;
    }
}

.header-buttons {
    display: flex;
    gap: 10px;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--footer-bg);
    color: var(--gray-color);
}

/* 卡片样式 */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 20px;
    margin-bottom: 20px;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.card-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.card-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.form-inline .form-group {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-inline label {
    margin-bottom: 0;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.card-key-card {
    max-width: 100%;
}

.input-with-action {
    position: relative;
    width: 100%;
}

.input-with-action input {
    width: 100%;
    min-width: 0;
    padding-right: 96px;
}

.btn-input-action {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    height: calc(100% - 12px);
    min-height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 16px;
    background-color: var(--secondary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    cursor: pointer;
    z-index: 1;
}

.btn-input-action:hover {
    background-color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    min-height: 44px;
    min-width: 44px;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn:active {
    background-color: var(--secondary-color);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-buy-vip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff9f43 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    animation: btnPulse 2s ease-in-out infinite;
}

.btn-buy-vip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.btn-buy-vip .btn-buy-badge {
    background: #fff;
    color: #ff6b35;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 53, 0.6);
    }
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-radius: 20px;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.btn-info {
    background-color: var(--info-color);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.btn-sm.active-page {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c33 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
    border: none;
}

.btn-icon {
    padding: 5px 10px;
    font-size: 18px;
    background: none;
    color: var(--primary-color);
}

.btn-icon:hover {
    background: none;
    color: var(--secondary-color);
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-color);
}

.btn-close:hover {
    color: var(--danger-color);
}

.btn-disabled,
.btn:disabled {
    background-color: var(--gray-color);
    cursor: not-allowed;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--header-bg);
    font-weight: bold;
}

.table tr:hover {
    background-color: var(--light-color);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

/* 加载指示器 - 进度条样式 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: transparent;
    z-index: 999;
    display: none;
    pointer-events: none;
}

.loading-indicator::before {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% {
        left: 0;
        width: 0;
    }
    50% {
        left: 0;
        width: 100%;
    }
    100% {
        left: 100%;
        width: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--card-bg);
    animation: spin 0.8s linear infinite;
}

.loading-indicator .spinner {
    display: none;
}

.loading-indicator:not(.hidden) .spinner {
    display: inline-block;
}

.loading-indicator p {
    display: none;
}

.loading-indicator:not(.hidden) p {
    display: block;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
}

/* 公告样式 */
.announcement {
    background-color: var(--warning-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

[data-theme="dark"] .announcement {
    background-color: #5a4a1a;
    color: #f5f7fa;
}

[data-theme="dark"] .announcement * {
    color: #f5f7fa !important;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.announcement-header h3 {
    margin: 0;
}

.announcement-content {
    line-height: 1.6;
}

/* 提醒样式 */
.reminder {
    background-color: #FF8C00;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: white;
}

[data-theme="dark"] .reminder {
    background-color: #8b4500;
}

.reminder h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: white;
}

.reminder p {
    margin-bottom: 15px;
    color: white;
}

.reminder .btn {
    background-color: white;
    color: #FF8C00;
    border: none;
}

.reminder .btn:hover {
    background-color: #f0f0f0;
}

/* 卡密信息样式 */
.card-key-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.card-key-info-item:last-child {
    border-bottom: none;
}

/* 小说结果样式 */
.novel-result {
    text-align: center;
    padding: 20px;
}

.novel-result h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.novel-result p {
    margin-bottom: 15px;
}

.cache-notice {
    color: var(--success-color);
    font-style: italic;
    margin-bottom: 15px;
}

/* 错误消息 */
.error-message {
    color: var(--danger-color);
    margin-bottom: 15px;
}

.error {
    color: var(--danger-color);
}

/* 工具类 */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* 下载成功提示 */
.download-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.success-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-icon {
    font-size: 20px;
    font-weight: bold;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* VIP徽章样式 */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    margin-left: 10px;
}

.vip-super {
    background: linear-gradient(90deg, #cc5500 0%, #ff8c33 25%, #cc5500 50%, #ff8c33 75%, #cc5500 100%);
    background-size: 200% 100%;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: shimmer 3s linear infinite;
    position: relative;
    overflow: hidden;
}

.vip-super::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, #ff8c33 0%, #cc5500 25%, #ff8c33 50%, #cc5500 75%, #ff8c33 100%);
    background-size: 200% 100%;
    border-radius: 22px;
    z-index: -1;
    animation: shimmer 3s linear infinite;
}

.vip-badge i {
    font-size: 12px;
}

/* 已验证卡密样式 */
.verified-card-key {
    background: linear-gradient(90deg, #cc5500 0%, #ff8c33 25%, #cc5500 50%, #ff8c33 75%, #cc5500 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 16px;
    animation: shimmer 3s linear infinite;
}

/* 小说名字样式 */
.novel-title {
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 10px 15px;
    background: linear-gradient(45deg, var(--card-bg), var(--light-color));
    color: var(--text-color);
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* 章节数样式 */
.chapter-count {
    color: #ff0000;
    font-weight: bold;
    font-size: 14px;
    margin: 5px 0;
}

/* 书籍卡片样式 */
.book-card {
    display: flex;
    gap: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: var(--card-bg);
}

.book-cover {
    width: 100px;
    flex-shrink: 0;
}

.book-cover img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.book-info {
    flex: 1;
    min-width: 0;
}

.book-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--primary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-meta {
    font-size: 14px;
    color: var(--gray-color);
    margin-bottom: 8px;
}

.book-meta i {
    margin-right: 5px;
}

.book-desc {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.book-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    color: var(--secondary-color);
    background-color: rgba(74, 137, 220, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* 书籍列表样式 */
.book-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 搜索结果样式 */
.search-results h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* 小说信息样式 */
.novel-info {
    font-size: 14px;
    margin: 5px 0;
    color: var(--gray-color);
}

/* 小说简介样式 */
.novel-desc {
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.5;
    color: var(--text-color);
    white-space: pre-line;
}

/* 章节加载样式 */
#chapters-loading {
    color: var(--gray-color);
    font-style: italic;
    margin: 10px 0;
}

/* 章节列表样式 */
.chapters-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.chapter-item {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.chapter-item:last-child {
    border-bottom: none;
}

/* 章节内容样式 */
.chapter-content {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--light-color);
    white-space: pre-line;
    line-height: 1.8;
}

/* 小说详情样式 */
.novel-detail {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

/* 小说头部样式 */
.novel-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 15px var(--shadow-color);
}

/* 小说封面样式 */
.novel-cover {
    width: 150px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.novel-cover img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

/* 小说元信息样式 */
.novel-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.novel-meta h2 {
    color: #ff6b00;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 1px 1px 2px var(--shadow-color);
}

/* 元信息样式 */
.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.meta-info span {
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--card-bg);
    padding: 5px 10px;
    border-radius: 15px;
    box-shadow: 0 1px 3px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.meta-info i {
    color: #ff6b00;
    font-size: 16px;
}

.meta-info .author {
    font-weight: bold;
}

.meta-info .status {
    color: #00c853;
}

.meta-info .chapter-count {
    color: #ff0000;
    font-weight: bold;
}

/* 小说标签样式 */
.novel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.novel-tags .book-tag {
    display: inline-block;
    padding: 6px 15px;
    font-size: 13px;
    color: white;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c33 100%);
    border: none;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(255, 107, 0, 0.3);
}

/* 小说简介样式 */
.novel-desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    white-space: pre-line;
    border-left: 4px solid #ff6b00;
}

/* 小说操作按钮样式 */
.novel-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* 下载按钮样式 */
.btn-download {
    display: inline-block;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c33 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 章节数量样式 */
.chapter-count {
    color: var(--primary-color);
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .novel-header {
        flex-direction: column;
        align-items: center;
    }
    
    .novel-cover {
        width: 120px;
    }
    
    .novel-cover img {
        height: 168px;
    }
    
    .novel-meta h2 {
        font-size: 20px;
        text-align: center;
    }
    
    .meta-info {
        justify-content: center;
        text-align: center;
    }
    
    .novel-tags {
        justify-content: center;
    }
    
    .novel-actions {
        justify-content: center;
    }
    
    .btn-download {
        width: 100%;
        text-align: center;
    }
}

/* 卡密信息项样式 */
.card-key-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.card-key-info-item:last-child {
    border-bottom: none;
}

.card-key-info-item span:first-child {
    font-weight: bold;
    color: var(--text-color);
}

.card-key-info-item span:last-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 状态圆圈指示器（红绿灯样式） */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.dot-green {
    background-color: #2ed573;
    box-shadow: 0 0 6px rgba(46, 213, 115, 0.5);
}

.status-dot.dot-yellow {
    background-color: #ffc107;
    box-shadow: 0 0 6px rgba(255, 193, 7, 0.5);
}

.status-dot.dot-orange {
    background-color: #ff9f43;
    box-shadow: 0 0 6px rgba(255, 159, 67, 0.5);
}

.status-dot.dot-red {
    background-color: #dc3545;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.5);
}

/* 下载次数醒目样式 */
.download-count-display.count-depleted {
    color: #dc3545;
}

.download-count-display.count-low {
    color: #ff6b35;
}

/* 到期时间紧急样式 */
.expire-time-display.expire-expired {
    color: #dc3545;
}

.expire-time-display.expire-critical {
    color: #dc3545;
}

.expire-time-display.expire-warning {
    color: #ff6b35;
}

.expire-time-display.expire-caution {
    color: #f5a623;
}

.card-type-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.card-type-permanent {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #8B4513;
}

.card-type-day {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.card-type-week {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.card-type-month {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    .site-brand {
        flex-direction: column;
    }

    .header-buttons {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .header-buttons .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .header-buttons .btn-buy-vip {
        padding: 8px 16px;
    }

    .header-buttons .btn-buy-vip span:first-of-type {
        font-size: 13px;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .form-inline .form-group {
        width: 100%;
        margin-bottom: 10px;
    }

    .form-inline .btn {
        width: 100%;
    }

    #keyword-input {
        font-size: 16px;
        padding: 12px 16px;
        height: auto;
        min-height: 48px;
    }

    .search-actions {
        flex-direction: column;
        gap: 10px;
    }

    .search-actions .btn-primary {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }

    .api-switcher {
        width: 100%;
    }

    #api-switch-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 22px;
    }

    .header-buttons {
        width: 100%;
    }

    .header-buttons a,
    .header-buttons button {
        flex: 1;
        min-width: 0;
    }

    .tp {
        padding: 6px 16px;
        font-size: 12px;
        gap: 10px;
    }

    .tp-m {
        display: none;
    }

    #keyword-input {
        font-size: 16px;
    }

    .card-key-card {
        max-width: 100%;
    }

    .input-with-action {
        width: 100%;
    }

    .input-with-action input {
        padding-right: 88px;
    }

    .btn-input-action {
        right: 6px;
        padding: 0 10px;
    }
}

/* 移动端下载容器样式 */
.mobile-download-container {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.mobile-download-info h3 {
    margin-top: 0;
    color: var(--text-color);
}

.mobile-download-info p {
    margin: 10px 0;
    color: var(--text-color);
}

.download-link-container {
    margin: 15px 0;
}

.download-link-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.download-link-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.download-url-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 12px;
    box-sizing: border-box;
}

.download-tip {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

@media (max-width: 768px) {
    .download-link-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .download-url-input {
        font-size: 11px;
    }
}

/* Toast 通知样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: auto;
}

.toast.success {
    background-color: var(--success-color);
    color: white;
}

.toast.error {
    background-color: var(--danger-color);
    color: white;
}

.toast.warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.toast.info {
    background-color: var(--info-color);
    color: white;
}

.toast-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    flex-shrink: 0;
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease-out forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ========== 骨架屏样式 ========== */
.skeleton-container {
    padding: 15px 0;
}

.skeleton-book-card {
    display: flex;
    gap: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: var(--card-bg);
}

.skeleton-cover {
    width: 100px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

[data-theme="dark"] .skeleton-cover {
    background: linear-gradient(90deg, #3a3a4a 25%, #4a4a5a 50%, #3a3a4a 75%);
    background-size: 200% 100%;
}

.skeleton-book-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

[data-theme="dark"] .skeleton-line {
    background: linear-gradient(90deg, #3a3a4a 25%, #4a4a5a 50%, #3a3a4a 75%);
    background-size: 200% 100%;
}

.skeleton-line.title {
    width: 60%;
    height: 20px;
}

.skeleton-line.meta {
    width: 40%;
    height: 14px;
}

.skeleton-line.desc1 {
    width: 100%;
    height: 14px;
}

.skeleton-line.desc2 {
    width: 85%;
    height: 14px;
}

.skeleton-line.tags {
    width: 50%;
    height: 12px;
}

.skeleton-line.btn {
    width: 100px;
    height: 36px;
    border-radius: 20px;
    margin-top: 4px;
}

/* 骨架屏 - 详情页 */
.skeleton-detail {
    padding: 20px;
}

.skeleton-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.skeleton-detail-cover {
    width: 150px;
    height: 210px;
    flex-shrink: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

[data-theme="dark"] .skeleton-detail-cover {
    background: linear-gradient(90deg, #3a3a4a 25%, #4a4a5a 50%, #3a3a4a 75%);
    background-size: 200% 100%;
}

.skeleton-detail-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line.detail-title {
    width: 70%;
    height: 28px;
}

.skeleton-line.detail-author {
    width: 45%;
    height: 16px;
}

.skeleton-line.detail-tags {
    width: 80%;
    height: 20px;
}

.skeleton-line.detail-desc {
    width: 100%;
    height: 14px;
}

.skeleton-line.detail-desc2 {
    width: 90%;
    height: 14px;
}

.skeleton-line.detail-desc3 {
    width: 75%;
    height: 14px;
}

/* 骨架屏 - 卡密验证 */
.skeleton-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.skeleton-line.card-label {
    width: 80px;
    height: 16px;
}

.skeleton-line.card-value {
    width: 120px;
    height: 16px;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 768px) {
    .skeleton-detail-header {
        flex-direction: column;
        align-items: center;
    }

    .skeleton-detail-cover {
        width: 120px;
        height: 168px;
    }
}

/* 章节范围选择器样式 */
.chapter-range-selector {
    margin: 20px 0;
    padding: 18px;
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
}

.chapter-range-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chapter-range-hint {
    font-size: 13px;
    color: var(--gray-color);
    margin-bottom: 14px;
    line-height: 1.5;
}

.chapter-range-inputs {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.chapter-range-field {
    flex: 1;
    min-width: 120px;
}

.chapter-range-field label {
    display: block;
    font-size: 12px;
    color: var(--gray-color);
    margin-bottom: 6px;
    font-weight: 600;
}

.chapter-range-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.2s;
}

.chapter-range-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 137, 220, 0.15);
}

.chapter-range-field input::placeholder {
    color: #aaa;
    font-size: 13px;
}

.chapter-range-separator {
    font-size: 20px;
    color: var(--gray-color);
    padding-bottom: 8px;
    font-weight: 300;
}

.btn-range-download {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%) !important;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3) !important;
}

.btn-range-download:hover {
    opacity: 0.9;
    transform: none;
}

@media (max-width: 768px) {
    .chapter-range-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .chapter-range-separator {
        display: none;
    }

    .chapter-range-field {
        min-width: 100%;
    }

    .novel-actions .btn-range-download {
        width: 100%;
        text-align: center;
    }
}

/* API切换器样式 */
.search-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.api-switcher {
    position: relative;
    display: inline-block;
}

.api-switcher .btn-sm {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 118px;
    justify-content: space-between;
    padding: 7px 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff9f43 100%);
    border: none;
    color: white;
    font-weight: 500;
    font-size: 13px;
    border-radius: 7px;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.25);
}

.api-arrow {
    font-size: 11px;
    opacity: 0.8;
}

.api-switcher.active .api-arrow {
    transform: rotate(180deg);
}

.api-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 270px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    z-index: 1000;
    overflow: hidden;
    animation: dropdownSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.api-dropdown-header {
    padding: 12px 14px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff9f43 100%);
    color: white;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.api-dropdown-header::before {
    content: '⚡';
    font-size: 15px;
}

.api-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.api-list::-webkit-scrollbar {
    width: 6px;
}

.api-list::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 3px;
}

.api-list::-webkit-scrollbar-thumb {
    background: var(--gray-color);
    border-radius: 3px;
}

.api-list::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

.api-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 7px;
    margin-bottom: 3px;
    border: 1px solid transparent;
}

.api-item.current {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9f43 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.api-item.current:hover {
    transform: translateX(0);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.api-item.current .api-name {
    color: white;
    font-weight: 600;
}

.api-item.current .api-time {
    color: rgba(255, 255, 255, 0.85);
}

.api-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.api-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.api-number {
    font-size: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b35 0%, #ff9f43 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.api-item.current .api-number {
    background: rgba(255, 255, 255, 0.25);
}

.api-item.current .api-name::before {
    content: '✓';
    font-weight: bold;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.2);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.api-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.api-time {
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.api-time::before {
    content: '';
}

.api-health {
    padding: 2px 6px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 500;
}

.api-health.healthy {
    background-color: rgba(140, 193, 82, 0.15);
    color: var(--success-color);
}

.api-health.unhealthy {
    background-color: rgba(218, 68, 83, 0.15);
    color: var(--danger-color);
}

.api-item.current .api-time {
    color: rgba(255, 255, 255, 0.85);
}

.api-item.current .api-health.healthy {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.api-item.current .api-health.unhealthy {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffcccc;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.api-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
    box-shadow: 0 0 6px var(--success-color);
    animation: statusPulse 2s infinite;
}

.api-status-dot.unhealthy {
    background-color: var(--danger-color);
    box-shadow: 0 0 8px var(--danger-color);
    animation: none;
}

.api-status-dot.loading {
    background-color: var(--warning-color);
    box-shadow: 0 0 8px var(--warning-color);
    animation: loadingPulse 1s infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

/* API切换器提示信息 */
.api-switcher-hint {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .search-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .api-switcher {
        width: 100%;
    }
    
    .api-switcher .btn-sm {
        width: 100%;
    }
    
    .api-dropdown {
        right: 0;
        left: 0;
        min-width: 100%;
    }
}
