/* Cookie 同意橫幅現代化設計 */
.cookie-consent {
    position: fixed;
    bottom: 30px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(15, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.6s ease-out;
    opacity: 0;
    transform: translateY(100px);
    display: none;
}

.cookie-consent.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.cookie-content {
    color: #fff;
    text-align: center;
}

.cookie-content h2 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    font-weight: 700;
    background: #6366f1;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cookie-content p {
    margin: 0 0 25px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}

.cookie-btn {
    padding: 15px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    min-width: 120px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.cookie-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.5s ease;
}

.cookie-btn:hover::before,
.cookie-btn:active::before {
    left: 100%;
}

.cookie-btn.accept {
    background: #3fb950;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.cookie-btn.customize {
    background: #2f81f7;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.cookie-btn.reject {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

.cookie-btn:hover,
.cookie-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.cookie-btn.accept:hover,
.cookie-btn.accept:active {
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
}

.cookie-btn.customize:hover,
.cookie-btn.customize:active {
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
}

.cookie-btn.reject:hover,
.cookie-btn.reject:active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.cookie-link {
    color: #64b5f6;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: inline-block;
    touch-action: manipulation;
}

.cookie-link:hover,
.cookie-link:active {
    color: #90caf9;
    background: rgba(100, 181, 246, 0.1);
    transform: translateY(-1px);
}

/* Cookie 設定彈窗現代化 */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    background: rgba(15, 15, 25, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 25px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    color: #fff;
    overflow-y: auto;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content.show {
    transform: scale(1);
}

.modal-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    background: #6366f1;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.cookie-categories {
    margin: 30px 0;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    margin: 15px 0;
    border-radius: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cookie-category:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.cookie-category p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* 現代化開關設計 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    top: 2px;
    background: #ffffff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
    background: #2f81f7;
    border-color: #2196F3;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.3);
}

input:checked + .slider:before {
    transform: translateX(30px);
    background: #ffffff;
}

input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.save-btn {
    background: #3fb950;
    color: #ffffff;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.save-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.5s ease;
}

.save-btn:hover::before {
    left: 100%;
}

.save-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.modal-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 動畫效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .cookie-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 25px;
        max-width: none;
    }

    .cookie-consent.show {
        opacity: 1;
        transform: translateY(0);
        display: block;
    }

    .cookie-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        padding: 18px 20px;
        min-height: 55px;
        font-size: 1rem;
        border-radius: 15px;
    }

    .cookie-content h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .cookie-content p {
        font-size: 1rem;
        margin-bottom: 25px;
        line-height: 1.7;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 10px;
        max-height: 90vh;
        border-radius: 20px;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .cookie-category {
        padding: 20px 15px;
        margin: 15px 0;
        border-radius: 12px;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .switch {
        align-self: flex-end;
    }

    .save-btn {
        width: 100%;
        padding: 18px 20px;
        font-size: 1.1rem;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .cookie-consent {
        left: 5px;
        right: 5px;
        bottom: 5px;
        padding: 20px;
    }

    .cookie-content h2 {
        font-size: 1.2rem;
    }

    .cookie-content p {
        font-size: 0.95rem;
    }

    .cookie-btn {
        min-height: 50px;
        font-size: 0.95rem;
    }

    .modal-content {
        padding: 20px 15px;
        margin: 5px;
    }
}

/* 主題特殊效果 */
.cookie-consent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #6366f1;
    animation: gradientMove 3s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 滾動條美化 */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}
