/**
 * Settings and Notifications Panels
 * Side panels with smooth slide-in animations
 */

/* Panel Container */
.side-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-panel.active {
    right: 0;
}

/* Panel Overlay */
.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* Panel Content */
.panel-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Panel Header */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(26, 255, 140, 0.1), rgba(26, 255, 140, 0.05));
    border-bottom: 2px solid rgba(26, 255, 140, 0.2);
}

.panel-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1aff8c;
}

.panel-header svg {
    flex-shrink: 0;
}

.panel-close-btn {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.panel-close-btn:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.5);
    transform: scale(1.1);
}

/* Panel Body */
.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.panel-body::-webkit-scrollbar {
    width: 8px;
}

.panel-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.panel-body::-webkit-scrollbar-thumb {
    background: rgba(26, 255, 140, 0.3);
    border-radius: 4px;
}

.panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 255, 140, 0.5);
}

/* Settings Section */
.settings-section {
    margin-bottom: 32px;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1aff8c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(26, 255, 140, 0.1);
}

/* Setting Item */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(26, 255, 140, 0.03);
    border: 1px solid rgba(26, 255, 140, 0.1);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.setting-item:hover {
    background: rgba(26, 255, 140, 0.05);
    border-color: rgba(26, 255, 140, 0.2);
}

.setting-info {
    flex: 1;
    margin-right: 16px;
}

.setting-label {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.setting-description {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.setting-value {
    font-size: 14px;
    font-weight: 600;
    color: #1aff8c;
    padding: 6px 12px;
    background: rgba(26, 255, 140, 0.1);
    border-radius: 8px;
}

/* Setting Select */
.setting-select {
    background: rgba(26, 255, 140, 0.05);
    border: 1px solid rgba(26, 255, 140, 0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.setting-select:hover {
    background: rgba(26, 255, 140, 0.1);
    border-color: rgba(26, 255, 140, 0.3);
}

.setting-select:focus {
    outline: none;
    border-color: #1aff8c;
    box-shadow: 0 0 0 3px rgba(26, 255, 140, 0.1);
}

.setting-select option {
    background: #1a1a1a;
    color: #fff;
    padding: 8px;
}

/* Setting Button */
.setting-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(26, 255, 140, 0.1);
    border: 1px solid rgba(26, 255, 140, 0.3);
    color: #1aff8c;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.setting-btn:hover {
    background: rgba(26, 255, 140, 0.2);
    border-color: rgba(26, 255, 140, 0.5);
    transform: translateY(-2px);
}

.setting-btn.danger {
    background: rgba(255, 77, 77, 0.1);
    border-color: rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
}

.setting-btn.danger:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.5);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(26, 255, 140, 0.3);
    border-color: #1aff8c;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background: #1aff8c;
}

.toggle-switch:hover .toggle-slider {
    background: rgba(255, 255, 255, 0.15);
}

.toggle-switch input:checked:hover + .toggle-slider {
    background: rgba(26, 255, 140, 0.4);
}

/* Notifications Panel Specific Styles */
.notification-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(26, 255, 140, 0.1);
    padding-bottom: 8px;
}

.notification-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    position: relative;
}

.notification-tab:hover {
    background: rgba(26, 255, 140, 0.05);
    color: #1aff8c;
}

.notification-tab.active {
    color: #1aff8c;
    background: rgba(26, 255, 140, 0.1);
}

.notification-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1aff8c;
}

.notification-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(26, 255, 140, 0.2);
    color: #1aff8c;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
}

.notification-tab.active .notification-count {
    background: #1aff8c;
    color: #000;
}

/* Notifications List */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(26, 255, 140, 0.03);
    border: 1px solid rgba(26, 255, 140, 0.1);
    border-left: 3px solid #1aff8c;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-item:hover {
    background: rgba(26, 255, 140, 0.05);
    border-color: rgba(26, 255, 140, 0.2);
    transform: translateX(-4px);
}

.notification-item.unread {
    background: rgba(26, 255, 140, 0.08);
    border-left-color: #1aff8c;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 255, 140, 0.1);
    border-radius: 10px;
    color: #1aff8c;
}

.notification-icon.download {
    background: rgba(29, 185, 84, 0.1);
    color: #1DB954;
}

.notification-icon.update {
    background: rgba(30, 144, 255, 0.1);
    color: #1E90FF;
}

.notification-icon.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #FFC107;
}

.notification-icon.error {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notification-time {
    font-size: 12px;
    color: #666;
}

.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-action-btn {
    padding: 6px 12px;
    background: rgba(26, 255, 140, 0.1);
    border: 1px solid rgba(26, 255, 140, 0.2);
    color: #1aff8c;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-action-btn:hover {
    background: rgba(26, 255, 140, 0.2);
    border-color: rgba(26, 255, 140, 0.4);
}

/* Empty State */
.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.notifications-empty h3 {
    color: #888;
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 8px;
}

.notifications-empty p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Notifications Footer */
.notifications-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(26, 255, 140, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.clear-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-all-btn:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .panel-content {
        max-width: 100%;
    }
    
    .panel-header {
        padding: 16px 20px;
    }
    
    .panel-header h2 {
        font-size: 20px;
    }
    
    .panel-body {
        padding: 16px 20px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .setting-info {
        margin-right: 0;
    }
    
    .setting-select,
    .setting-btn {
        width: 100%;
        justify-content: center;
    }
    
    .toggle-switch {
        align-self: flex-end;
    }
}

/* Tablet Size */
@media (min-width: 769px) and (max-width: 1024px) {
    .panel-content {
        max-width: 400px;
    }
}
