/* Cookie 横幅 - 与网站风格一致 */
.ck-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    z-index: 9999;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

.ck-banner.show {
    display: block;
    animation: ck-slide-up 0.3s cubic-bezier(0.28, 0.11, 0.32, 1);
}

.ck-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.ck-content-text {
    flex: 1;
    margin-right: 24px;
}

.ck-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-light);
    letter-spacing: -0.016em;
}

.ck-buttons {
    display: flex;
    gap: 12px;
}

.ck-btn {
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.28, 0.11, 0.32, 1);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ck-btn-primary {
    background: var(--pink-primary);
    color: var(--text-light);
}

.ck-btn-primary:hover {
    background: var(--pink-dark);
    transform: translateY(-1px);
}

.ck-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.ck-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Cookie 设置模态框 */
.ck-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ck-modal.show {
    display: flex;
    animation: ck-fade-in 0.3s ease-out;
}

.ck-modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-x: hidden;
    width: calc(100% - 40px);
}

.ck-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
}

.ck-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.ck-close-button {
    background: none;
    border: none;
    font-size: 24px;
    color: #6e6e73;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ck-close-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.ck-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.ck-modal-description {
    margin: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #424245;
}

.ck-option {
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ck-option:last-child {
    margin-bottom: 0;
}

.ck-option-header {
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ck-option-label {
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: 500;
    color: #1d1d1f;
}

.ck-checkbox {
    margin-right: 12px;
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ck-checkbox:checked {
    background-color: #0071e3;
    border-color: #0071e3;
}

.ck-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ck-checkbox:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ck-option-body {
    padding: 16px;
}

.ck-option-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #424245;
}

.ck-warning {
    margin: 12px 0 0 0;
    padding: 8px 12px;
    background-color: rgba(255, 204, 0, 0.1);
    border-left: 3px solid #ffcc00;
    font-size: 12px;
    line-height: 1.4;
    color: #8a6d00;
}

.ck-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@keyframes ck-slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes ck-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ck-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ck-content-text {
        margin-right: 0;
        margin-bottom: 12px;
        width: 100%;
    }
    
    .ck-buttons {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ck-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .ck-btn {
        width: 100%;
        text-align: center;
    }
}

/* 第三方 Cookie 警告横幅 */
.ck-warning-banner {
    position: fixed;
    top: 60px;
    right: 16px;
    max-width: 320px;
    box-sizing: border-box;
    width: calc(100% - 32px);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-left: 3px solid var(--pink-primary);
    box-shadow: var(--shadow-md);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
    animation: ck-slide-in 0.3s cubic-bezier(0.28, 0.11, 0.32, 1);
    overflow: hidden;
}

.ck-warning-banner.ck-fade-out {
    animation: ck-fade-out 0.5s cubic-bezier(0.28, 0.11, 0.32, 1) forwards;
}

.ck-warning-content {
    display: flex;
    flex-direction: column;
}

.ck-warning-content p {
    margin: 0 0 10px 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-light);
    letter-spacing: -0.016em;
}

.ck-btn-small {
    align-self: flex-end;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.28, 0.11, 0.32, 1);
}

.ck-btn-small:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

@keyframes ck-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes ck-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 确保所有子元素也使用border-box */
.ck-banner *,
.ck-banner *::before,
.ck-banner *::after {
    box-sizing: border-box;
}

/* 确保按钮在小屏幕上不会溢出 */
.ck-btn {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 修复警告横幅可能的溢出问题 */
.ck-warning-banner *,
.ck-warning-banner *::before,
.ck-warning-banner *::after {
    box-sizing: border-box;
}

/* 修复模态框可能的溢出问题 */
.ck-modal-content {
    box-sizing: border-box;
    overflow-x: hidden;
    width: calc(100% - 40px);
    max-width: 600px;
} 