/* ========== Cookie 同意横幅 ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
    padding: 20px 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-banner.show {
    transform: translateY(0);
}
.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cookie-banner-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}
.cookie-banner-text strong {
    color: var(--text-dark);
}
.cookie-banner-text a {
    color: var(--accent);
    text-decoration: underline;
}
.cookie-banner-text a:hover {
    color: var(--accent-hover);
}
.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}
.cookie-btn-accept {
    background: var(--accent);
    color: #fff;
}
.cookie-btn-accept:hover {
    background: var(--accent-hover);
}
.cookie-btn-reject {
    background: #fff;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}
.cookie-btn-reject:hover {
    border-color: var(--text-gray);
    color: var(--text-dark);
}
.cookie-btn-settings {
    background: none;
    color: var(--accent);
    padding: 10px 12px;
}
.cookie-btn-settings:hover {
    background: rgba(59,130,246,0.08);
}
.cookie-btn-settings svg {
    width: 18px;
    height: 18px;
}

/* ========== Cookie 设置弹窗 ========== */
.cookie-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.cookie-modal-overlay.show {
    display: flex;
}
.cookie-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}
.cookie-modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cookie-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}
.cookie-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.2s;
}
.cookie-modal-close:hover {
    background: var(--bg-section);
    color: var(--text-dark);
}
.cookie-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.cookie-category {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.cookie-category:last-child {
    border-bottom: none;
}
.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.cookie-category-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cookie-category-title .badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.badge-required {
    background: rgba(16,185,129,0.1);
    color: #10b981;
}
.cookie-category-desc {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 自定义开关 */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
}
.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.cookie-toggle input:checked + .cookie-toggle-slider {
    background: var(--accent);
}
.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}
.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 弹窗底部按钮 */
.cookie-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cookie-modal-footer-left {
    display: flex;
    gap: 12px;
}
.cookie-modal-footer .cookie-btn {
    padding: 10px 24px;
}

/* ========== 隐私政策页面 ========== */
.privacy-page {
    padding: 120px 24px 80px;
    max-width: 800px;
    margin: 0 auto;
}
.privacy-page h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}
.privacy-page .updated-date {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 40px;
}
.privacy-page h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}
.privacy-page h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 24px;
    margin-bottom: 10px;
}
.privacy-page p {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 16px;
}
.privacy-page ul {
    padding-left: 24px;
    margin-bottom: 16px;
}
.privacy-page ul li {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 6px;
    list-style: inherit;
}
.privacy-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.privacy-page table th,
.privacy-page table td {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
}
.privacy-page table th {
    background: var(--bg-section);
    font-weight: 600;
    color: var(--text-dark);
}
.privacy-page table td {
    color: var(--text-gray);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .cookie-banner-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .cookie-banner-actions .cookie-btn {
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
    .cookie-modal {
        max-height: 90vh;
    }
    .cookie-modal-footer {
        flex-direction: column;
    }
    .cookie-modal-footer-left {
        width: 100%;
    }
    .cookie-modal-footer-left .cookie-btn {
        flex: 1;
    }
    .cookie-modal-footer .cookie-btn-accept {
        width: 100%;
    }
    .privacy-page {
        padding: 100px 20px 60px;
    }
    .privacy-page h1 {
        font-size: 28px;
    }
}
