/**
 * ELECTROTÉCNICA PRO - IPET N°66
 * Calculator-specific styles
 * Estilos adicionales para calculadoras y componentes
 */

/* Technical Diagrams - Handle dark mode inversion */
[data-theme="dark"] .technical-diagram {
    filter: invert(0.9) hue-rotate(180deg) brightness(1.2);
}

.technical-diagram {
    transition: filter 0.3s ease;
    border-radius: 8px;
}

.diagram-container {
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.example-note {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

.diagram-box {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
}


/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

/* ==================== TABLAS DE DATOS ==================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-secondary);
}

.tab:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--text-primary);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ==================== RESULT GRID ==================== */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.result-value {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ==================== FORMULA DISPLAY ==================== */
.formula-box {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.formula-box strong {
    color: var(--primary);
}

.formula-display {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    margin: 1rem 0;
    border-left: 3px solid var(--secondary);
}

/* ==================== MESSAGES (AI CHAT) ==================== */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    max-width: 80%;
    animation: slideUp 0.3s ease;
}

.message-user {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-ai {
    background: var(--bg-secondary);
    color: var(--text-primary);
    margin-right: auto;
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 4px;
}

/* ==================== ESTILOS PARA ASISTENTE IA ==================== */

/* Contenedor principal */
.ai-assistant-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* Header del chat */
.chat-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.header-main {
    flex: 1;
}

.chat-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-title i {
    font-size: 1.3rem;
}

.chat-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.local {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-text {
    font-weight: 500;
}

/* Panel de control */
.control-panel-compact {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.control-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.mode-selector-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.control-label {
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-selector {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.mode-selector:hover {
    border-color: var(--primary);
}

.mode-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.control-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* Panel de configuración */
.settings-dropdown {
    position: relative;
}

.settings-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    width: 320px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    display: none;
}

.settings-dropdown:hover .settings-panel,
.settings-panel:hover {
    display: block;
}

.settings-group {
    margin-bottom: 1.25rem;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

.temp-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.temp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.temp-value {
    font-weight: 600;
    color: var(--primary);
    min-width: 30px;
    text-align: center;
}

.api-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Área de chat principal */
.chat-area-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--bg-secondary);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Mensaje de bienvenida */
.welcome-message {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--secondary-rgb), 0.1) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.welcome-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.welcome-content h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.welcome-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.welcome-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.welcome-features li {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.2s ease;
}

.welcome-features li:hover {
    transform: translateY(-2px);
}

.welcome-features li i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Mensajes del chat */
.message {
    display: flex;
    gap: 1rem;
    max-width: 85%;
    animation: messageAppear 0.3s ease-out;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-assistant {
    align-self: flex-start;
}

.message-system {
    align-self: center;
    max-width: 90%;
}

.message-error {
    align-self: center;
    max-width: 90%;
}

.message-typing {
    align-self: flex-start;
}

.message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.message-user .message-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.message-assistant .message-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.message-content {
    flex: 1;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    position: relative;
    min-width: 200px;
}

.message-user .message-content {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-assistant .message-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.message-system .message-content {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--text-color);
    text-align: center;
}

.message-error .message-content {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.message-typing .message-content {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Contenido de mensajes */
.message-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

.message-subtitle {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.75rem 0 0.5rem 0;
    color: var(--text-color);
}

.message-text {
    line-height: 1.6;
}

.message-text p {
    margin: 0.5rem 0;
}

.message-text strong {
    color: var(--primary);
    font-weight: 600;
}

.message-text em {
    font-style: italic;
    color: var(--text-muted);
}

.inline-code {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #fbbf24;
}

.message-text pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.75rem 0;
    border-left: 4px solid var(--primary);
}

.message-text pre code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    text-align: right;
}

.message-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.message:hover .message-actions {
    opacity: 1;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Indicador de escritura */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingDot 1.4s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Indicador de fuente */
.source-indicator {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sección de input */
.chat-input-section {
    padding: 1.25rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.input-wrapper {
    position: relative;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.chat-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    line-height: 1.5;
    transition: all 0.3s ease;
    min-height: 60px;
    max-height: 200px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    height: 60px;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(var(--primary-rgb), 0.2);
}

.send-text {
    display: inline;
}

/* Footer del input */
.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-tips {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tip i {
    color: var(--primary);
}

.tip kbd {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

.footer-modes {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mode-tag {
    padding: 0.5rem 0.75rem;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-tag:hover {
    background: rgba(var(--primary-rgb), 0.2);
    transform: translateY(-1px);
}

/* Sugerencias */
.suggestions-container {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: none;
}

.suggestions-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.suggestion-btn {
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.suggestion-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estadísticas */
.stats-container {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--secondary-rgb), 0.05) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.stats-container h3 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: var(--card-bg);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

.notification-success {
    border-left-color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
}

.notification-info {
    border-left-color: #3b82f6;
}

.notification i {
    font-size: 1.2rem;
}

.notification.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chat-header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .chat-status {
        align-self: flex-start;
    }

    .control-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .mode-selector-group {
        flex-direction: column;
        align-items: stretch;
    }

    .mode-selector {
        min-width: 100%;
    }

    .settings-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 400px;
    }

    .message {
        max-width: 95%;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .send-btn {
        width: 100%;
        justify-content: center;
    }

    .send-text {
        display: inline;
    }

    .input-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .footer-tips,
    .footer-modes {
        width: 100%;
        justify-content: center;
    }

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

/* Animaciones adicionales */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modos específicos */
.mode-electronics .message-assistant .message-content {
    border-left: 4px solid #3b82f6;
}

.mode-programming .message-assistant .message-content {
    border-left: 4px solid #10b981;
}

.mode-creative .message-assistant .message-content {
    border-left: 4px solid #ec4899;
}

.mode-educational .message-assistant .message-content {
    border-left: 4px solid #f59e0b;
}

/* Scrollbar personalizado */
.chat-messages-container::-webkit-scrollbar {
    width: 8px;
}

.chat-messages-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== CORRECCIONES ESPECÍFICAS ===== */

/* Botón de creatividad corregido */
.temp-slider {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    outline: none;
    margin-top: 0.5rem;
    -webkit-appearance: none;
    appearance: none;
}

.temp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.temp-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid var(--card-bg);
}

.temp-value {
    font-weight: 600;
    color: var(--primary);
    margin-left: 0.5rem;
}

/* Botones de API */
.api-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.api-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Mensajes del sistema */
.message-system .message-content {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
}

/* Estadísticas */
.stats-card {
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.stats-card h3 {
    margin-top: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stat-key {
    font-weight: 500;
    color: var(--text-color);
}

.stat-value {
    font-weight: 600;
    color: var(--primary);
}

/* Correcciones responsive */
@media (max-width: 768px) {
    .control-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .mode-selector-container {
        width: 100%;
    }

    .mode-selector {
        width: 100%;
    }

    .control-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .footer-modes {
        flex-wrap: wrap;
        justify-content: center;
    }

    .mode-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

/* ==================== ASISTENTE IA - ESTILOS ==================== */
.ai-assistant-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.chat-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.status-dot.active {
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.control-panel-compact {
    padding: 1rem 1.5rem;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.mode-selector,
.style-selector,
.level-selector {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
}

.chat-area-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--bg-color);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.message {
    display: flex;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user .message-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.assistant .message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.message-content {
    max-width: 70%;
    padding: 1rem;
    border-radius: 12px;
    position: relative;
}

.user .message-content {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant .message-content {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.message-text {
    line-height: 1.6;
}

.message-text p {
    margin-bottom: 0.5rem;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.message-text code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.user .message-text code {
    background: rgba(255, 255, 255, 0.2);
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    text-align: right;
}

.suggestions-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.suggestion-chip {
    padding: 0.75rem 1rem;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.suggestion-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.chat-input-section {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    min-height: 60px;
    max-height: 120px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text);
    font-family: inherit;
    resize: none;
    transition: all 0.3s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-btn {
    padding: 1rem 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Markdown Styles */
.message-text h1,
.message-text h2,
.message-text h3,
.message-text h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.message-text h1 {
    font-size: 1.5rem;
}

.message-text h2 {
    font-size: 1.3rem;
}

.message-text h3 {
    font-size: 1.1rem;
}

.message-text ul,
.message-text ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
}

.message-text li {
    margin-bottom: 0.25rem;
}

.message-text pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5rem 0;
    border: 1px solid var(--border-color);
}

.user .message-text pre {
    background: rgba(255, 255, 255, 0.1);
}

.message-text blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: var(--text-muted);
}

.message-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
}

.message-text th,
.message-text td {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.message-text th {
    background: var(--sidebar-bg);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-header {
        padding: 1rem;
    }

    .control-panel-compact {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .chat-messages-container {
        padding: 1rem;
    }

    .message-content {
        max-width: 85%;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .send-btn {
        width: 100%;
        justify-content: center;
    }

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

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }
}

/* API Configuration Modal */
.api-config-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.api-config-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.api-providers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.api-provider-card {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.api-provider-card:hover {
    border-color: var(--primary);
}

.api-provider-card.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

/* Stats Panel */
.stats-panel {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: var(--sidebar-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Knowledge Base Badges */
.knowledge-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    margin: 0.25rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.book-reference {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.75rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.book-reference strong {
    color: #10b981;
}

/* ==================== RESISTOR VISUAL ==================== */
.resistor-container {
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.4);
    min-height: 180px;
}

.resistor-body {
    position: relative;
    width: 200px;
    height: 70px;
    background: #deb887;
    /* BurlyWood */
    background: linear-gradient(to bottom, #deb887 0%, #ecd0ac 20%, #c19a6b 50%, #a67c52 80%, #8b5a2b 100%);
    border-radius: 35px;
    /* Rounded ends */
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    z-index: 2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.resistor-body:hover {
    transform: scale(1.02);
}

.resistor-lead {
    width: 100px;
    height: 8px;
    background: linear-gradient(to bottom, #94a3b8, #cbd5e1, #64748b);
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.resistor-band {
    width: 14px;
    height: 100%;
    position: relative;
    box-shadow: inset 1px 0 1px rgba(255, 255, 255, 0.2), inset -1px 0 1px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.resistor-band {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 12px;
    box-shadow:
        inset 1px 0 1px rgba(255, 255, 255, 0.2),
        inset -1px 0 1px rgba(0, 0, 0, 0.2),
        1px 0 3px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.resistor-band.band-glow {
    filter: brightness(1.2) contrast(1.1);
}

/* ==================== CHART CONTAINERS ==================== */
.chart-container {
    position: relative;
    height: 400px;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

/* ==================== INFO BOXES ==================== */
.info-box {
    padding: 1rem;
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.warning-box {
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.success-box {
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border-left: 4px solid var(--success);
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.error-box {
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--error);
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

/* ==================== COMPONENT TYPE BADGES ==================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(37, 99, 235, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.badge-secondary {
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* ==================== LOADING STATES ==================== */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-secondary) 0%,
            var(--bg-tertiary) 50%,
            var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==================== RESPONSIVE TABLES ==================== */
@media (max-width: 768px) {
    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }

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

    .message {
        max-width: 90%;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .data-table {
        border: 1px solid #000;
    }

    .data-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
    }

    .tabs,
    .btn-group {
        display: none;
    }
}

/* ==================== UTILITIES ==================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-success {
    color: #10b981;
}

.text-error {
    color: #ef4444;
}

.text-warning {
    color: #f59e0b;
}

.text-accent {
    color: #6366f1;
}

/* ==================== SMART SEARCH ==================== */
.search-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.search-trigger:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.search-trigger kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: inherit;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--text-primary);
}

.search-trigger:hover {
    background: var(--accent-primary);
    transform: scale(1.05);
}

.search-trigger kbd {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== SMART SEARCH DROPDOWN ==================== */
.search-dropdown-container {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 400px;
    z-index: 10000;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-modal {
    background: var(--bg-main);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.search-modal-header input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

.search-modal-header kbd {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.search-results {
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-modal-footer {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--glass-border);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.search-result-item:hover,
.search-result-item.selected {
    background: var(--bg-secondary);
    border: 1px solid var(--primary);
}

.result-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
}

.search-result-item.selected .result-icon {
    background: var(--primary);
    color: white;
}

.result-info {
    flex: 1;
}

.result-title {
    font-weight: 600;
    color: var(--text-primary);
}

.result-category {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.result-action {
    opacity: 0;
    transition: opacity 0.2s;
}

.search-result-item:hover .result-action,
.search-result-item.selected .result-action {
    opacity: 1;
}

/* ==================== PWA NOTIFICATIONS ==================== */
.update-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-main);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    max-width: 400px;
}

.toast-content {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.toast-content i {
    font-size: 2rem;
    color: var(--primary);
}

.pwa-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
}

.pwa-toast-success {
    border-color: #10b981;
    color: #10b981;
}

.animate-slide-in {
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from {
        transform: translate(-50%, 2rem);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}/* CL66 Responsive Dynamic Logo */
.cl66-hero-logo {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    width: 600px;
    height: auto;
    object-fit: contain;
    animation: floatingLogo 4s ease-in-out infinite, fadeInScale 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: scale(0.8);
    margin-bottom: 2rem;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
    content: url('../assets/CL66/1.svg'); /* fallback */
}

@keyframes fadeInScale {
    0% { opacity: 0; transform: translateY(20px) scale(0.8); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floatingLogo {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

html[data-theme="dark"] .cl66-hero-logo,
html[data-theme="light"] .cl66-hero-logo {
    content: url('../assets/CL66/2.svg'); /* Non-colored for standard themes */
}

html[data-theme="rainbow"] .cl66-hero-logo {
    content: url('../assets/CL66/1.svg'); /* Colorful only for rainbow theme */
}
