.cookie-consent-banner,
.cookie-modal {
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}
.cookie-consent-banner {
    position: fixed;
    bottom: env(safe-area-inset-bottom);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    border-top: 3px solid #D4B3FF;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}
.cookie-consent-banner.show {
    display: block;
    opacity: 1;
    visibility: visible;
}
.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.cookie-consent-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    color: #D4B3FF;
}
.cookie-consent-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
}
.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}
.cookie-btn-primary {
    background: linear-gradient(135deg, #D4B3FF 0%, #B794F6 100%);
    color: #1a1a1a;
}
.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 179, 255, 0.4);
}
.cookie-btn-secondary {
    background: transparent;
    color: #D4B3FF;
    border: 2px solid #D4B3FF;
}
.cookie-btn-secondary:hover {
    background: #D4B3FF;
    color: #1a1a1a;
}
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.cookie-modal.show {
    display: flex;
}
.cookie-modal-content {
    background: #1a1a1a;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid #D4B3FF;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.cookie-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cookie-modal-header h2 {
    margin: 0;
    color: #D4B3FF;
    font-size: 1.5rem;
}
.cookie-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}
.cookie-modal-close:hover {
    background: #333;
}
.cookie-modal-body {
    padding: 25px 30px;
}
.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #2d2d2d;
    border-radius: 10px;
    border-left: 4px solid #D4B3FF;
}
.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.cookie-category h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}
.cookie-category p {
    margin: 0;
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
}
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #666;
    transition: 0.3s;
    border-radius: 24px;
}
.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}
input:checked + .cookie-slider {
    background-color: #D4B3FF;
}
input:checked + .cookie-slider:before {
    transform: translateX(26px);
}
input:disabled + .cookie-slider {
    background-color: #D4B3FF;
    opacity: 0.6;
    cursor: not-allowed;
}
.cookie-modal-footer {
    padding: 20px 30px 25px;
    text-align: center;
    border-top: 1px solid #333;
}
.performance-monitor {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    font-family: monospace;
    z-index: 9999;
    display: none;
}
.performance-monitor.show {
    display: block;
}
.performance-metric {
    margin: 2px 0;
}
.metric-good { color: #4CAF50; }
.metric-warning { color: #FF9800; }
.metric-poor { color: #F44336; }
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .cookie-consent-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
    .cookie-modal-content {
        width: 95%;
        margin: 20px;
    }
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 15px;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
        padding-left: calc(15px + env(safe-area-inset-left));
        padding-right: calc(15px + env(safe-area-inset-right));
    }
    .cookie-consent-text h3 {
        font-size: 1.1rem;
    }
    .cookie-consent-text p {
        font-size: 0.85rem;
    }
    .cookie-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}
@media print {
    .cookie-consent-banner,
    .cookie-modal,
    .performance-monitor {
        display: none !important;
    }
}
