/**
 * Theme Switcher
 * Quick theme changing with 8 pre-defined themes
 */

/* ===================================
   THEME SWITCHER BUTTON
   =================================== */

.theme-switcher-btn {
    position: fixed;
    top: 20px;
    right: 80px;
    width: 48px;
    height: 48px;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.theme-switcher-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 6px 20px rgba(0, 243, 255, 0.2);
}

.theme-switcher-btn i {
    font-size: 24px;
    color: #00f3ff;
}

/* ===================================
   THEME SWITCHER PANEL
   =================================== */

.theme-switcher-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-switcher-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.theme-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-switcher-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.theme-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    transition: color 0.2s;
}

.theme-close-btn:hover {
    color: #ffffff;
}

/* ===================================
   THEME GRID
   =================================== */

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.theme-option {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.3);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: #00f3ff;
    background: rgba(0, 243, 255, 0.1);
}

.theme-option.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #00f3ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0e27;
    font-size: 12px;
    font-weight: 700;
}

.theme-preview {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    height: 24px;
}

.theme-preview-color {
    flex: 1;
    border-radius: 4px;
}

.theme-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.theme-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===================================
   THEME PREVIEW COLORS
   =================================== */

/* Dark Theme */
.theme-option[data-theme="dark"] .theme-preview-color:nth-child(1) {
    background: #0a0e27;
}

.theme-option[data-theme="dark"] .theme-preview-color:nth-child(2) {
    background: #00f3ff;
}

.theme-option[data-theme="dark"] .theme-preview-color:nth-child(3) {
    background: #0066ff;
}

/* Light Theme */
.theme-option[data-theme="light"] .theme-preview-color:nth-child(1) {
    background: #ffffff;
}

.theme-option[data-theme="light"] .theme-preview-color:nth-child(2) {
    background: #1a73e8;
}

.theme-option[data-theme="light"] .theme-preview-color:nth-child(3) {
    background: #34a853;
}

/* Cyan Theme */
.theme-option[data-theme="cyan"] .theme-preview-color:nth-child(1) {
    background: #0c4a6e;
}

.theme-option[data-theme="cyan"] .theme-preview-color:nth-child(2) {
    background: #06b6d4;
}

.theme-option[data-theme="cyan"] .theme-preview-color:nth-child(3) {
    background: #22d3ee;
}

/* Purple Theme */
.theme-option[data-theme="purple"] .theme-preview-color:nth-child(1) {
    background: #2e1065;
}

.theme-option[data-theme="purple"] .theme-preview-color:nth-child(2) {
    background: #8b5cf6;
}

.theme-option[data-theme="purple"] .theme-preview-color:nth-child(3) {
    background: #a78bfa;
}

/* Green Theme */
.theme-option[data-theme="green"] .theme-preview-color:nth-child(1) {
    background: #14532d;
}

.theme-option[data-theme="green"] .theme-preview-color:nth-child(2) {
    background: #10b981;
}

.theme-option[data-theme="green"] .theme-preview-color:nth-child(3) {
    background: #34d399;
}

/* Orange Theme */
.theme-option[data-theme="orange"] .theme-preview-color:nth-child(1) {
    background: #7c2d12;
}

.theme-option[data-theme="orange"] .theme-preview-color:nth-child(2) {
    background: #f59e0b;
}

.theme-option[data-theme="orange"] .theme-preview-color:nth-child(3) {
    background: #fbbf24;
}

/* Rose Theme */
.theme-option[data-theme="rose"] .theme-preview-color:nth-child(1) {
    background: #4c0519;
}

.theme-option[data-theme="rose"] .theme-preview-color:nth-child(2) {
    background: #f43f5e;
}

.theme-option[data-theme="rose"] .theme-preview-color:nth-child(3) {
    background: #fb7185;
}

/* High Contrast Theme */
.theme-option[data-theme="high-contrast"] .theme-preview-color:nth-child(1) {
    background: #000000;
}

.theme-option[data-theme="high-contrast"] .theme-preview-color:nth-child(2) {
    background: #00ff00;
}

.theme-option[data-theme="high-contrast"] .theme-preview-color:nth-child(3) {
    background: #ffff00;
}

/* ===================================
   THEME TRANSITION
   =================================== */

body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

.fusion-card,
.metric-card,
.dashboard-hero {
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .theme-switcher-btn {
        top: 15px;
        right: 70px;
        width: 42px;
        height: 42px;
    }

    .theme-switcher-panel {
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .theme-grid {
        grid-template-columns: 1fr;
    }
}