/* Cookieplus Premium Design System (Inspired by Apple & Google) */
:root {
    --cp-primary: #0066cc; /* Apple Blue */
    --cp-bg: rgba(255, 255, 255, 0.82);
    --cp-text: #1d1d1f;
    --cp-subtext: #86868b;
    --cp-radius: 18px;
    --cp-blur: 25px;
}

#cookieplus-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 680px;
    background: var(--cp-bg);
    backdrop-filter: blur(var(--cp-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--cp-blur)) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1), 0 0 1px rgba(0,0,0,0.2);
    border-radius: var(--cp-radius);
    padding: 32px;
    z-index: 999999;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    display: none;
    color: var(--cp-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

#cookieplus-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    display: block;
}

/* Apple Style Header & Logo */
#cookieplus-banner .logo-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#cookieplus-banner .logo-box img {
    height: 26px;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.lang-switch {
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 8px;
    display: flex;
    gap: 2px;
}

.lang-switch span {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    color: var(--cp-subtext);
}

.lang-switch span.active {
    background: #fff;
    color: var(--cp-text);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#cookieplus-banner h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#cookieplus-banner p {
    font-size: 15px;
    line-height: 1.5;
    color: #424245;
    margin-bottom: 28px;
}

/* Button Group (Google/Apple Hybrid) */
#cookieplus-banner .actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

#cookieplus-banner button {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
}

#cookieplus-banner .btn-agree {
    background: #0071e3; /* Apple Blue */
    color: white;
}

#cookieplus-banner .btn-agree:hover {
    background: #0077ed;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

#cookieplus-banner .btn-settings {
    background: rgba(0, 0, 0, 0.05);
    color: var(--cp-text);
}

#cookieplus-banner .btn-settings:hover {
    background: rgba(0, 0, 0, 0.08);
}

#cookieplus-banner .btn-decline {
    background: transparent;
    color: var(--cp-subtext);
    font-weight: 400;
}

#cookieplus-banner .btn-decline:hover {
    color: var(--cp-text);
}

/* Settings View (Card Style) */
#cookieplus-settings-view .cookie-item {
    padding: 24px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.2s;
}

#cookieplus-settings-view .cookie-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

#cookieplus-settings-view .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#cookieplus-settings-view h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#cookieplus-settings-view .item-desc {
    font-size: 13px;
    line-height: 1.4;
    color: var(--cp-subtext);
    margin: 0;
}

/* Apple Switch Component */
.cp-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.cp-switch input { opacity: 0; width: 0; height: 0; }

.cp-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d2d2d7;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 26px;
}

.cp-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

input:checked + .cp-slider { background-color: #34c759; /* Apple Green */ }
input:checked + .cp-slider:before { transform: translateX(20px); }

/* Custom Scrollbar for Settings */
#cookieplus-banner::-webkit-scrollbar {
    width: 6px;
}
#cookieplus-banner::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

/* 响应式 */
@media (max-width: 640px) {
    #cookieplus-banner {
        bottom: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 24px;
    }
    #cookieplus-banner .actions {
        flex-direction: column;
    }
    #cookieplus-banner button {
        width: 100%;
    }
}
