/* Theme Switcher UI Styles */

.theme-switcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.theme-switcher-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 2px 8px var(--glow-primary, rgba(124, 58, 237, 0.3));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-switcher-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.theme-switcher-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 4px 12px var(--glow-primary, rgba(124, 58, 237, 0.4));
}

.theme-switcher-toggle:active::before {
    width: 100px;
    height: 100px;
}

.theme-switcher-toggle svg {
    width: 24px;
    height: 24px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Theme Menu */
.theme-switcher-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: var(--bg-card, #141414);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.theme-switcher-menu.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.theme-switcher-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-switcher-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary, #f0f0f0);
}

.theme-switcher-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted, #888888);
}

/* Theme Options */
.theme-options {
    padding: 12px;
}

.theme-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 8px;
}

.theme-option:last-child {
    margin-bottom: 0;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.theme-option.active {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--primary, #7C3AED);
}

.theme-option.active .theme-check {
    opacity: 1;
}

/* Theme Preview */
.theme-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.theme-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
}

.theme-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
}

/* Dark Theme Preview */
.theme-preview-dark {
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
}

.theme-preview-dark::before {
    background: linear-gradient(90deg, #7C3AED 0%, #FB923C 100%);
}

.theme-preview-dark::after {
    background: #141414;
}

/* Blue Theme Preview */
.theme-preview-blue {
    background: linear-gradient(135deg, #152651 0%, #0F1D3A 100%);
}

.theme-preview-blue::before {
    background: linear-gradient(90deg, #6366F1 0%, #F59E0B 100%);
}

.theme-preview-blue::after {
    background: #1A2F4D;
}

/* Theme Info */
.theme-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.theme-info strong {
    color: var(--secondary, #f0f0f0);
    font-size: 0.95rem;
    font-weight: 600;
}

.theme-info span {
    color: var(--text-muted, #888888);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Check Mark */
.theme-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #7C3AED);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .theme-switcher {
        bottom: 16px;
        right: 16px;
    }

    .theme-switcher-toggle {
        width: 48px;
        height: 48px;
    }

    .theme-switcher-toggle svg {
        width: 20px;
        height: 20px;
    }

    .theme-switcher-menu {
        width: calc(100vw - 32px);
        max-width: 300px;
        bottom: 62px;
    }

    .theme-preview {
        width: 40px;
        height: 40px;
    }

    .theme-info strong {
        font-size: 0.9rem;
    }

    .theme-info span {
        font-size: 0.75rem;
    }
}

/* Print - Hide theme switcher */
@media print {
    .theme-switcher {
        display: none !important;
    }
}

/* Accessibility - Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .theme-switcher-toggle svg {
        animation: none;
    }

    .theme-switcher-menu {
        transition-duration: 0.1s;
    }

    .theme-option {
        transition-duration: 0.1s;
    }
}
