/* Estilos personalizados - Tema Oscuro */

/* Scrollbar personalizada para tema oscuro */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Menú móvil */
.mobile-menu-hidden {
    display: none;
}

.mobile-menu-visible {
    display: block;
}

@media (min-width: 768px) {
    .mobile-menu-hidden,
    .mobile-menu-visible {
        display: flex;
    }
}

/* Transiciones suaves */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ============================================
   WIDGETS COLAPSABLES - Dashboard
   ============================================ */

.widget {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    user-select: none;
    background: rgba(17, 24, 39, 0.5);
    transition: background 0.2s;
}

.widget-header:hover {
    background: rgba(17, 24, 39, 0.7);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.widget-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.widget-badge {
    background: rgba(59, 130, 246, 0.3);
    color: rgb(147, 197, 253);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.widget-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.widget-action {
    padding: 6px 10px;
    border-radius: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    color: rgba(156, 163, 175, 1);
    font-size: 16px;
}

.widget-action:hover {
    background: rgba(59, 130, 246, 0.2);
    color: rgb(147, 197, 253);
}

.widget-toggle {
    padding: 4px 8px;
    border-radius: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    color: rgba(156, 163, 175, 1);
    font-size: 14px;
}

.widget-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    color: rgb(147, 197, 253);
}

.widget-content {
    padding: 16px;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.widget.collapsed .widget-content {
    max-height: 0;
    padding: 0 16px;
    overflow: hidden;
    opacity: 0;
}

.widget.collapsed .icon-expanded {
    display: none;
}

.widget:not(.collapsed) .icon-collapsed {
    display: none;
}

/* Trading Post Tabs Mejorados */
.trading-post-tab-button {
    position: relative;
    transition: all 0.2s ease;
}

.trading-post-tab-button:hover {
    background: rgba(59, 130, 246, 0.1);
}

.trading-post-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.trading-post-tab-button.active .trading-post-tab-badge {
    background: rgba(59, 130, 246, 0.5);
}

/* Trading Post - Mejoras Visuales */
.trading-post-tab-button.active {
    background: rgba(59, 130, 246, 0.1);
}

/* Agrupación por rareza - Headers de grupo */
.rarity-group-header {
    background: rgba(75, 85, 99, 0.3);
    font-weight: 600;
}

/* Vista consolidada */
#consolidated-view {
    animation: fadeIn 0.3s ease-in;
}

/* Cards de resumen mejoradas */
.summary-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   MYSTIC CLOVER CALCULATOR - Botón Flotante y Modal
   ============================================ */

/* Botón flotante */
#mystic-clover-float-btn {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

#mystic-clover-float-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Tabs del modal de Mystic Clovers */
.mystic-clover-tab {
    transition: all 0.2s ease;
    cursor: pointer;
}

.mystic-clover-tab:hover {
    background: rgba(59, 130, 246, 0.1);
}

.mystic-clover-tab.active {
    background: rgba(59, 130, 246, 0.1);
}

/* Contenido de tabs */
.mystic-clover-tab-content {
    animation: fadeIn 0.3s ease-in;
}

/* Responsive: Ajustar posición del botón flotante en móvil */
@media (max-width: 768px) {
    #mystic-clover-float-btn {
        top: 4rem; /* Debajo del botón del menú móvil */
        right: 1rem;
    }
}