/* Styles pour le graphique dynamique et la modal */

/* Chart Preview Styles */
.chart-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.chart-preview {
    height: 120px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.chart-preview:hover .chart-mini-preview {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.chart-placeholder {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-mini-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(20, 170, 125, 0.2) 0%,
        rgba(20, 170, 125, 0.1) 50%,
        rgba(20, 170, 125, 0.2) 100%);
    transition: all 0.3s ease;
}

.chart-open-message {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, rgba(29, 41, 57, 0.95) 0%, rgba(20, 30, 40, 0.98) 100%);
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--solana-green);
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-time-selector {
    display: flex;
    gap: 6px;
}

.time-option {
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.time-option:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.time-option.active {
    background: var(--solana-green);
    color: rgba(0, 0, 0, 0.9);
    font-weight: 500;
}

.btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: white;
}

.chart-modal .chart-container {
    height: 60vh;
    min-height: 400px;
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.chart-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-stat-item {
    text-align: center;
}

/* Animation de pulse pour la miniature du graphique */
@keyframes pulse-chart {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.chart-mini-preview::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.3), rgba(255,255,255,0));
    animation: shine-chart 3s infinite;
    left: -100px;
}

@keyframes shine-chart {
    0% { left: -100px; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Animation pour l'apparition du graphique */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tradingview-widget-container {
    animation: fadeIn 0.5s ease;
}

/* Style spécifique pour le widget TradingView */
.tradingview-widget-container {
    width: 100%;
    height: 100%;
}

/* Styles pour les conteneurs scrollables */
.signals-container {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    max-height: 400px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
}

.signals-container::-webkit-scrollbar {
    width: 5px;
}

.signals-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.signals-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Styles pour le nouveau layout avec cartes côte à côte */
.cards-flex-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.cards-flex-container .flash-card {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tag-age {
    display: inline-block;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Styles pour les conteneurs meme-tokens */
.meme-tokens {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 0 10px;
    overflow-y: auto;
    flex: 1;
    max-height: 350px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
}

.meme-tokens::-webkit-scrollbar {
    width: 5px;
}

.meme-tokens::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.meme-tokens::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Optimisation pour mobile */
@media (max-width: 768px) {
    .cards-flex-container {
        flex-direction: column;
    }
}

/* Styles pour l'animation de chargement */
.loading.meme-tokens {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 0 10px;
    overflow-y: auto;
    flex: 1;
    max-height: 400px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
}

.meme-tokens::-webkit-scrollbar {
    width: 5px;
}

.meme-tokens::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.meme-tokens::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
    gap: 15px;
}

/* Style pour le message d'erreur */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #ff6b6b;
    text-align: center;
    gap: 10px;
}

.error-message i {
    font-size: 24px;
    margin-bottom: 10px;
}

.error-message p {
    font-size: 14px;
    opacity: 0.9;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.loading-spinner .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--solana-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

.meme-tokens.loaded .token-card {
    animation: fadeInUp 0.3s ease-out forwards;
    opacity: 0;
}

.meme-tokens.loaded .token-card:nth-child(1) { animation-delay: 0s; }
.meme-tokens.loaded .token-card:nth-child(2) { animation-delay: 0.1s; }
.meme-tokens.loaded .token-card:nth-child(3) { animation-delay: 0.2s; }
.meme-tokens.loaded .token-card:nth-child(4) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
