<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sistema de Temas - Preview</title>
    <style>
/* ========================================
   SISTEMA DE TEMAS COMPLETO
   Múltiplos temas + Customização
   ======================================== */

/* BASE - Tema Claro (Default) */
:root[data-theme="default"],
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-dark: #1e40af;
    --accent: #10b981;
    --accent-hover: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #f3f4f6;
    --border: #e5e7eb;
    --border-hover: #d1d5db;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --star-color: #fbbf24;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* TEMA DARK */
:root[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #1e3a8a;
    --primary-dark: #1e40af;
    --accent: #10b981;
    --accent-hover: #059669;
    --warning: #fbbf24;
    --danger: #ef4444;
    --success: #10b981;
    --text: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg: #111827;
    --bg-secondary: #1f2937;
    --bg-dark: #374151;
    --border: #374151;
    --border-hover: #4b5563;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
    --star-color: #fbbf24;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* TEMA DRACULA */
:root[data-theme="dracula"] {
    --primary: #bd93f9;
    --primary-hover: #9370db;
    --primary-light: #6272a4;
    --primary-dark: #8b5cf6;
    --accent: #50fa7b;
    --accent-hover: #3dd664;
    --warning: #f1fa8c;
    --danger: #ff5555;
    --success: #50fa7b;
    --text: #f8f8f2;
    --text-secondary: #9ca3af;
    --text-muted: #6272a4;
    --bg: #282a36;
    --bg-secondary: #44475a;
    --bg-dark: #1e1f29;
    --border: #44475a;
    --border-hover: #6272a4;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.7);
    --star-color: #ffb86c;
    --gradient-1: linear-gradient(135deg, #bd93f9 0%, #ff79c6 100%);
    --gradient-2: linear-gradient(135deg, #50fa7b 0%, #8be9fd 100%);
}

/* TEMA CATPPUCCIN MOCHA */
:root[data-theme="catppuccin"] {
    --primary: #89b4fa;
    --primary-hover: #74c7ec;
    --primary-light: #45475a;
    --primary-dark: #7287fd;
    --accent: #a6e3a1;
    --accent-hover: #94e2d5;
    --warning: #f9e2af;
    --danger: #f38ba8;
    --success: #a6e3a1;
    --text: #cdd6f4;
    --text-secondary: #a6adc8;
    --text-muted: #7f849c;
    --bg: #1e1e2e;
    --bg-secondary: #313244;
    --bg-dark: #181825;
    --border: #45475a;
    --border-hover: #585b70;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
    --star-color: #f9e2af;
    --gradient-1: linear-gradient(135deg, #89b4fa 0%, #cba6f7 100%);
    --gradient-2: linear-gradient(135deg, #f5c2e7 0%, #fab387 100%);
}

/* TEMA ONE DARK */
:root[data-theme="onedark"] {
    --primary: #61afef;
    --primary-hover: #528bcc;
    --primary-light: #3e4451;
    --primary-dark: #4b92d6;
    --accent: #98c379;
    --accent-hover: #7fa761;
    --warning: #e5c07b;
    --danger: #e06c75;
    --success: #98c379;
    --text: #abb2bf;
    --text-secondary: #828997;
    --text-muted: #5c6370;
    --bg: #282c34;
    --bg-secondary: #21252b;
    --bg-dark: #1c1f24;
    --border: #3e4451;
    --border-hover: #4b5263;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.7);
    --star-color: #e5c07b;
    --gradient-1: linear-gradient(135deg, #61afef 0%, #c678dd 100%);
    --gradient-2: linear-gradient(135deg, #98c379 0%, #56b6c2 100%);
}

/* TEMA SOLARIZED DARK */
:root[data-theme="solarized"] {
    --primary: #268bd2;
    --primary-hover: #2075b5;
    --primary-light: #073642;
    --primary-dark: #1e6ba8;
    --accent: #2aa198;
    --accent-hover: #238a82;
    --warning: #b58900;
    --danger: #dc322f;
    --success: #859900;
    --text: #839496;
    --text-secondary: #657b83;
    --text-muted: #586e75;
    --bg: #002b36;
    --bg-secondary: #073642;
    --bg-dark: #001f27;
    --border: #073642;
    --border-hover: #094555;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
    --star-color: #b58900;
    --gradient-1: linear-gradient(135deg, #268bd2 0%, #6c71c4 100%);
    --gradient-2: linear-gradient(135deg, #2aa198 0%, #859900 100%);
}

/* TEMA NORD */
:root[data-theme="nord"] {
    --primary: #88c0d0;
    --primary-hover: #81a1c1;
    --primary-light: #3b4252;
    --primary-dark: #5e81ac;
    --accent: #a3be8c;
    --accent-hover: #8fa876;
    --warning: #ebcb8b;
    --danger: #bf616a;
    --success: #a3be8c;
    --text: #eceff4;
    --text-secondary: #d8dee9;
    --text-muted: #4c566a;
    --bg: #2e3440;
    --bg-secondary: #3b4252;
    --bg-dark: #242933;
    --border: #434c5e;
    --border-hover: #4c566a;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --star-color: #ebcb8b;
    --gradient-1: linear-gradient(135deg, #88c0d0 0%, #81a1c1 100%);
    --gradient-2: linear-gradient(135deg, #a3be8c 0%, #8fbcbb 100%);
}

/* TRANSIÇÕES SUAVES ENTRE TEMAS */
* {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Desabilitar transição em elementos específicos */
.no-transition,
.no-transition * {
    transition: none !important;
}

/* ========================================
   ANIMAÇÕES AVANÇADAS
   ======================================== */

/* CONFETTI ANIMATION */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 99999;
    animation: confetti-fall 3s ease-out forwards;
}

/* PARTICLE EFFECT */
@keyframes particle-float {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    animation: particle-float 1s ease-out forwards;
}

/* LOADING SKELETON */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-dark) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-card {
    height: 200px;
    margin-bottom: 16px;
}

/* PULSE ANIMATION */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* FADE IN */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* SLIDE IN FROM LEFT */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

/* BOUNCE */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

/* SHAKE */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

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

.animate-spin {
    animation: rotate 1s linear infinite;
}

/* GLOW EFFECT */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary),
                    0 0 10px var(--primary),
                    0 0 15px var(--primary);
    }
    50% {
        box-shadow: 0 0 10px var(--primary),
                    0 0 20px var(--primary),
                    0 0 30px var(--primary);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* PREVIEW CARD HOVER */
.preview-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
}

.preview-card:hover::before {
    left: 100%;
}

/* LIGHTBOX OVERLAY */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    color: black;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--danger);
    color: white;
}

/* ========================================
   TEMA SELECTOR UI
   ======================================== */

.theme-selector {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(180deg);
}

.theme-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

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

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.theme-option:hover {
    background: var(--bg-secondary);
}

.theme-option.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.theme-color-preview {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--border);
}

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

@media (max-width: 768px) {
    .theme-selector {
        bottom: 10px;
        right: 10px;
    }
    
    .theme-toggle-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .preview-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .theme-selector,
    .lightbox-overlay,
    .confetti,
    .particle {
        display: none !important;
    }
}
    </style>
</head>
<body>
    <!-- Preview do Sistema de Temas -->
    <div style="padding: 40px; background: var(--bg); min-height: 100vh;">
        <h1 style="color: var(--text); margin-bottom: 20px;">
            🎨 Sistema de Temas Implementado
        </h1>
        
        <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 40px;">
            <div class="preview-card" style="padding: 20px; background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--border);">
                <h3 style="color: var(--primary);">✅ Temas Disponíveis</h3>
                <ul style="color: var(--text-secondary); list-style: none; padding: 0;">
                    <li>• Default (Claro)</li>
                    <li>• Dark Mode</li>
                    <li>• Dracula</li>
                    <li>• Catppuccin</li>
                    <li>• One Dark</li>
                    <li>• Solarized</li>
                    <li>• Nord</li>
                </ul>
            </div>
            
            <div class="preview-card" style="padding: 20px; background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--border);">
                <h3 style="color: var(--accent);">✨ Animações</h3>
                <ul style="color: var(--text-secondary); list-style: none; padding: 0;">
                    <li>• Confetti ao avaliar 5★</li>
                    <li>• Partículas no download</li>
                    <li>• Loading skeletons</li>
                    <li>• Transições suaves</li>
                </ul>
            </div>
            
            <div class="preview-card" style="padding: 20px; background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--border);">
                <h3 style="color: var(--warning);">🎯 Funcionalidades</h3>
                <ul style="color: var(--text-secondary); list-style: none; padding: 0;">
                    <li>• Preview em hover</li>
                    <li>• Lightbox de imagens</li>
                    <li>• Tema persistente</li>
                    <li>• Smooth transitions</li>
                </ul>
            </div>
        </div>
        
        <h2 style="color: var(--text); margin: 30px 0 20px;">Skeleton Loaders (Preview)</h2>
        <div style="background: var(--bg-secondary); padding: 20px; border-radius: 12px;">
            <div class="skeleton skeleton-title"></div>
            <div class="skeleton skeleton-text" style="width: 90%;"></div>
            <div class="skeleton skeleton-text" style="width: 80%;"></div>
            <div class="skeleton skeleton-text" style="width: 95%;"></div>
        </div>
    </div>
    
    <!-- Theme Selector (Fixed) -->
    <div class="theme-selector">
        <button class="theme-toggle-btn" onclick="toggleThemeMenu()">
            <i class="fas fa-palette"></i>
        </button>
        <div class="theme-menu" id="themeMenu">
            <div class="theme-option" onclick="setTheme('default')">
                <div class="theme-color-preview" style="background: #2563eb;"></div>
                <span>Default</span>
            </div>
            <div class="theme-option" onclick="setTheme('dark')">
                <div class="theme-color-preview" style="background: #111827;"></div>
                <span>Dark</span>
            </div>
            <div class="theme-option" onclick="setTheme('dracula')">
                <div class="theme-color-preview" style="background: #282a36;"></div>
                <span>Dracula</span>
            </div>
            <div class="theme-option" onclick="setTheme('catppuccin')">
                <div class="theme-color-preview" style="background: #1e1e2e;"></div>
                <span>Catppuccin</span>
            </div>
            <div class="theme-option" onclick="setTheme('onedark')">
                <div class="theme-color-preview" style="background: #282c34;"></div>
                <span>One Dark</span>
            </div>
            <div class="theme-option" onclick="setTheme('solarized')">
                <div class="theme-color-preview" style="background: #002b36;"></div>
                <span>Solarized</span>
            </div>
            <div class="theme-option" onclick="setTheme('nord')">
                <div class="theme-color-preview" style="background: #2e3440;"></div>
                <span>Nord</span>
            </div>
        </div>
    </div>
    
    <script>
        function toggleThemeMenu() {
            document.getElementById('themeMenu').classList.toggle('active');
        }
        
        function setTheme(theme) {
            document.documentElement.setAttribute('data-theme', theme);
            localStorage.setItem('theme', theme);
            
            // Atualizar classe active
            document.querySelectorAll('.theme-option').forEach(opt => {
                opt.classList.remove('active');
            });
            event.target.closest('.theme-option').classList.add('active');
            
            toggleThemeMenu();
        }
        
        // Carregar tema salvo
        const savedTheme = localStorage.getItem('theme') || 'default';
        document.documentElement.setAttribute('data-theme', savedTheme);
        
        // Fechar menu ao clicar fora
        document.addEventListener('click', (e) => {
            if (!e.target.closest('.theme-selector')) {
                document.getElementById('themeMenu').classList.remove('active');
            }
        });
    </script>
</body>
</html>