/* =================== RESET & BASE =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
    padding: 20px;
    padding-top: 100px; /* Espace pour le bandeau fixe */
}

/* =================== CONTAINER =================== */
.container {
    max-width: 1900px;
    margin: 20px auto 0;
}

/* =================== HEADER =================== */
.header {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(59, 130, 246, 0.3);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
    flex: 1;
}

.header-title h1 {
    font-size: 2.5em;
    font-weight: 200;
    background: linear-gradient(45deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.header-title p {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 300;
}

.header-stats {
    display: flex;
    gap: 30px;
    background: rgba(30, 41, 59, 0.8);
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.header-stats.hidden {
    display: none;
}

.header-stat {
    text-align: center;
    padding: 0 20px;
    border-right: 2px solid rgba(59, 130, 246, 0.2);
}

.header-stat:last-child {
    border-right: none;
}

.header-stat-value {
    font-size: 2.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff8c00, #ff6500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-stat-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* =================== DASHBOARD MAIN =================== */
.dashboard {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(59, 130, 246, 0.3);
}

/* =================== FILE UPLOAD SECTION =================== */
.file-upload-section {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 8px;
    min-width: 200px;
    max-width: 250px;
    flex-shrink: 0;
}

.file-upload-section h3 {
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.file-upload-section h3::before {
    content: "📊";
    font-size: 0.8rem;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: block;
    padding: 8px 12px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    text-align: center;
    border: 1px dashed transparent;
}

.file-input-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.4);
}

.file-input-label.drag-over {
    border-color: #06b6d4;
    background: rgba(59, 130, 246, 0.1);
}

.file-status {
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 300;
    text-align: center;
    color: #94a3b8;
    line-height: 1.2;
}

.file-status.success {
    color: #22c55e;
    font-weight: 400;
}

.file-status.error {
    color: #ef4444;
    font-weight: 400;
}

/* =================== FILTERS SECTION =================== */
.filters-section {
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: none;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filters-title {
    color: #60a5fa;
    font-size: 1.1rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filters-title::before {
    content: "🎛️";
    font-size: 1.2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    color: #cbd5e1;
    font-weight: 400;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.filter-group select,
.filter-group input {
    padding: 10px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 300;
    transition: all 0.3s ease;
}

.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(75%) sepia(100%) saturate(500%) hue-rotate(10deg) brightness(1.2);
    cursor: pointer;
}

.filter-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(75%) sepia(100%) saturate(600%) hue-rotate(10deg) brightness(1.4);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-group select.active-filter,
.filter-group input.active-filter {
    border-color: #3b82f6;
    border-width: 2px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.filtering-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    display: none;
    z-index: 1000;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* =================== BUTTONS =================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-secondary {
    background: rgba(71, 85, 105, 0.5);
    color: #e2e8f0;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* =================== TABLE CONTAINER =================== */
.table-container {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    display: none;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.table-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #f1f5f9;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 400;
    border-bottom: 2px solid rgba(59, 130, 246, 0.5);
}

.table-wrapper {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    position: relative;
}

table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

thead {
    position: sticky;
    top: 0;
    z-index: 100;
}

th {
    background: #1e293b;
    padding: 16px;
    text-align: left;
    font-weight: 400;
    font-size: 0.95rem;
    color: #60a5fa;
    border-bottom: 2px solid rgba(59, 130, 246, 0.5);
    position: sticky;
    top: 0;
    z-index: 10;
    letter-spacing: 0.5px;
}

/* Colonnes alternées */
tbody td:nth-child(odd) {
    background: rgba(30, 41, 59, 0.3);
}

tbody td:nth-child(even) {
    background: rgba(15, 23, 42, 0.2);
}

/* Colonnes colorées spéciales */
thead th:nth-child(7),
tbody td:nth-child(7) {
    background: rgba(251, 146, 60, 0.08) !important;
    border-left: 1px solid rgba(251, 146, 60, 0.15);
    border-right: 1px solid rgba(251, 146, 60, 0.15);
}

thead th:nth-child(8),
tbody td:nth-child(8) {
    background: rgba(239, 68, 68, 0.08) !important;
    border-left: 1px solid rgba(239, 68, 68, 0.15);
    border-right: 1px solid rgba(239, 68, 68, 0.15);
}

thead th:nth-child(9),
tbody td:nth-child(9) {
    background: rgba(34, 197, 94, 0.08) !important;
    border-left: 1px solid rgba(34, 197, 94, 0.15);
    border-right: 1px solid rgba(34, 197, 94, 0.15);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    color: #f1f5f9;
    font-weight: 300;
    font-size: 0.9rem;
}

td strong {
    font-weight: 400;
    color: #60a5fa;
}

tbody tr:hover td {
    background: rgba(59, 130, 246, 0.1) !important;
    cursor: pointer;
}

tbody tr:hover td:nth-child(7) {
    background: rgba(251, 146, 60, 0.12) !important;
}

tbody tr:hover td:nth-child(8) {
    background: rgba(239, 68, 68, 0.12) !important;
}

tbody tr:hover td:nth-child(9) {
    background: rgba(34, 197, 94, 0.12) !important;
}

.profit-positive {
    color: #4ade80;
    font-weight: 400;
}

.profit-negative {
    color: #f87171;
    font-weight: 400;
}

/* =================== CHARTS SECTION =================== */
.charts-section {
    margin-top: 30px;
    margin-bottom: 25px;
}

.chart-container {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    padding: 15px 25px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.chart-title {
    color: #60a5fa;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 15px;
    text-align: center;
}

#symbolChart, 
#monthChart {
    width: 100%;
    height: 200px;
}

/* Navigation pour les graphiques */
.chart-nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.chart-nav-button {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chart-nav-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.chart-nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chart-year-display {
    min-width: 200px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

/* Labels spécifiques pour graphiques */
.month-chart-labels {
    font-size: 16px !important;
    font-weight: 500 !important;
}

.month-chart-profit {
    color: #ffd700 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.month-chart-symbols {
    color: #60a5fa !important;
    font-weight: 500 !important;
    font-size: 13px !important;
}

/* =================== CALENDAR SECTION =================== */
.calendar-section {
    margin-top: 30px;
    margin-bottom: 25px;
}

.calendar-container {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.calendar-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.calendar-nav button {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.calendar-nav button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.calendar-month {
    font-size: 1.4rem;
    font-weight: 300;
    color: #60a5fa;
}

#yearSelect {
    padding: 10px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 300;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 20px;
}

.calendar-day-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    padding: 10px;
    text-align: center;
    font-weight: 400;
    color: #60a5fa;
    font-size: 0.9rem;
}

.calendar-day {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(71, 85, 105, 0.3);
    padding: 5px;
    min-height: 70px;
    position: relative;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
}

.calendar-day.clickable {
    cursor: pointer;
}

.calendar-day.clickable:hover {
    box-shadow: 0 2px 8px rgba(2,6,23,0.08);
    transform: translateY(-1px);
}

.calendar-day.other-month {
    opacity: 0.3;
    background: rgba(15, 23, 42, 0.3);
}

.calendar-day.today {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.calendar-day-number {
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 3px;
    color: #cbd5e1;
}

.calendar-trades {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 6px;
}

.calendar-trade {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 6px;
    color: white;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    margin: 3px 0;
}

.calendar-trade.profit {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #062017;
    font-weight: 600;
}

.calendar-trade.loss {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.calendar-trade.timeout {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #0f172a;
}

.calendar-trade.more-trades.timeout {
    background: rgba(249,115,22,0.18) !important;
    color: #0f172a !important;
}

.calendar-legend {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-weight: 300;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

/* =================== MODAL =================== */
.modal {
    display: none;
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    margin: 5% auto;
    padding: 0;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.modal-title {
    font-size: 1.5em;
    font-weight: 300;
    margin: 0;
}

.close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: 100;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close:hover {
    color: #f1f5f9;
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.95);
}

.trade-item {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid rgba(148, 163, 184, 0.3);
    transition: all 0.2s ease;
}

.trade-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.trade-item.profit {
    border-left: 4px solid #16a34a;
    background: rgba(34,197,94,0.04);
}

.trade-item.loss {
    border-left: 4px solid #dc2626;
    background: rgba(239,68,68,0.04);
}

.trade-item.timeout {
    border-left: 4px solid #f97316;
    background: rgba(249,115,22,0.06);
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.trade-symbol {
    font-weight: 400;
    font-size: 1.2rem;
    color: #60a5fa;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.trade-symbol:hover {
    color: #93bbfc;
    text-decoration: underline;
}

.trade-profit {
    font-weight: 400;
    font-size: 1.2rem;
}

.trade-profit.positive {
    color: #22c55e;
}

.trade-profit.negative {
    color: #ef4444;
}

.trade-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.trade-detail {
    display: flex;
    justify-content: space-between;
    font-weight: 300;
    padding: 4px 0;
}

.trade-detail-label {
    font-weight: 400;
    color: #cbd5e1;
    margin-right: 10px;
}

.trade-detail span:last-child {
    text-align: right;
}

/* Styles spéciaux pour certains éléments */
.price-highlight {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #fb923c !important;
    background: rgba(251, 146, 60, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(251, 146, 60, 0.2);
}

.sl-highlight {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.tp-highlight {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* =================== BANDEAU UNIFIÉ MARCHÉS + TIMER =================== */
.unified-market-timer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
    min-height: 60px;
}

.timer-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.candle-icon {
    font-size: 32px;
    animation: candle-glow 2s ease-in-out infinite;
}

@keyframes candle-glow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 5px rgba(255, 200, 0, 0.5)); }
    50% { filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 200, 0, 0.8)); }
}

.timer-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timer-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    min-width: 25px;
}

.timer-value {
    font-size: 14px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    min-width: 50px;
}

.timer-5m {
    color: #60a5fa;
}

.timer-1h {
    color: #4ade80;
}

.countdown {
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    min-width: 55px;
}

.countdown-5m {
    color: #93c5fd;
}

.countdown-1h {
    color: #86efac;
}

.countdown.last-minute {
    color: #ef4444;
    animation: urgent-blink 1s ease-in-out infinite;
}

@keyframes urgent-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.paris-time {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.paris-icon {
    font-size: 16px;
}

#current-paris-time {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.divider {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, 
        transparent, 
        rgba(59, 130, 246, 0.5) 20%, 
        rgba(59, 130, 246, 0.5) 80%, 
        transparent
    );
    flex-shrink: 0;
}

.markets-section {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.market-item {
    display: flex;
    flex-direction: column;
    padding: 6px 12px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    min-width: 100px;
}

.market-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.market-item.open {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.market-item.closed {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.market-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.status-icon {
    font-size: 10px;
    line-height: 1;
}

.market-item.open .status-icon {
    animation: pulse-status 2s ease-in-out infinite;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.market-flag {
    font-size: 14px;
}

.market-name {
    font-weight: 700;
    color: #f1f5f9;
    font-size: 13px;
}

.market-info {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
}

.market-city {
    color: #94a3b8;
}

.market-status {
    font-weight: 600;
}

.market-item.open .market-status {
    color: #4ade80;
}

.market-item.closed .market-status {
    color: #f87171;
}

/* =================== FILTRE DURÉE INTELLIGENT =================== */
.duration-filter-group {
    grid-column: 1 / -1;
    background: rgba(15, 23, 42, 0.5);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-top: 10px;
    order: 999;
    display: none;
}

.duration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.duration-header label {
    color: #ffd700 !important;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
    font-size: 0.95rem !important;
}

.duration-inputs {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.duration-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.duration-input-group label {
    font-size: 12px !important;
    color: #94a3b8 !important;
    min-width: 35px;
    font-weight: 400 !important;
    margin-bottom: 0 !important;
}

.duration-input {
    width: 80px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.7);
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 300;
    transition: all 0.3s ease;
}

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

.duration-unit {
    width: 110px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.7);
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 300;
    transition: all 0.3s ease;
}

.duration-unit:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.duration-separator {
    color: #cbd5e1;
    font-weight: 500;
    padding: 0 12px;
    font-size: 14px;
}

.duration-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.preset-btn {
    padding: 6px 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 300;
}

.preset-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    transform: translateY(-1px);
}

.preset-btn.active {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.duration-input.active-filter,
.duration-unit.active-filter {
    border-color: #3b82f6;
    border-width: 2px;
    background: rgba(59, 130, 246, 0.05);
}

.btn-show-duration {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 400;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-show-duration:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.4);
}

.btn-duration-toggle {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 400;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-duration-toggle:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
}

/* =================== BADGES ET RÉSULTATS =================== */
.result-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

.result-badge.profit {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #062017;
}

.result-badge.loss {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.result-badge.timeout {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #0f172a;
}

/* =================== SYMBOL CHART SECTION =================== */
.symbol-chart-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.symbol-chart-section .chart-container,
.charts-section .chart-container {
    padding: 12px 20px;
}

.charts-section .chart-container {
    padding-bottom: 20px;
}

/* =================== UTILITIES =================== */
.hidden {
    display: none !important;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-style: italic;
    font-weight: 300;
}

/* =================== SCROLLBAR STYLING =================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* =================== RESPONSIVE =================== */
@media (max-width: 1200px) {
    .unified-market-timer {
        padding: 8px 15px;
        gap: 15px;
    }
    
    .market-item {
        min-width: 90px;
        padding: 5px 10px;
    }
    
    .timer-value {
        font-size: 13px;
    }

    .header {
        flex-direction: column;
        gap: 20px;
    }

    .header-left {
        flex-direction: column;
        width: 100%;
        gap: 20px;
    }

    .header-stats {
        width: 100%;
        justify-content: space-around;
    }

    .file-upload-section {
        width: 100%;
        max-width: 100%;
    }

    .duration-filter-group {
        grid-column: span 1;
    }

    .duration-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .duration-input-group {
        justify-content: space-between;
        width: 100%;
    }

    .duration-input {
        width: 90px;
    }

    .duration-unit {
        width: 115px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        padding-top: 140px;
    }

    .unified-market-timer {
        flex-wrap: wrap;
        padding: 8px 10px;
        gap: 10px;
    }
    
    .timer-section {
        width: 100%;
        justify-content: center;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    }
    
    .divider {
        display: none;
    }
    
    .markets-section {
        width: 100%;
        gap: 8px;
    }
    
    .market-item {
        min-width: auto;
        flex: 1;
        padding: 4px 8px;
    }
    
    .market-info {
        flex-direction: column;
        gap: 2px;
    }

    .header {
        padding: 15px;
    }

    .header-title h1 {
        font-size: 1.8rem;
    }

    .header-stat-value {
        font-size: 1.3rem;
    }

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

    .filter-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    table {
        font-size: 0.8em;
    }

    th {
        padding: 12px;
        font-size: 0.85rem;
    }

    td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .duration-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .duration-input-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .duration-input-group label {
        margin-bottom: 4px !important;
    }

    .duration-presets {
        justify-content: center;
    }

    .preset-btn {
        font-size: 10px;
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .candle-icon {
        font-size: 24px;
    }
    
    .timer-value {
        font-size: 12px;
        min-width: 45px;
    }
    
    .countdown {
        font-size: 11px;
        min-width: 50px;
    }
    
    .market-item {
        padding: 3px 6px;
    }
    
    .market-name {
        font-size: 12px;
    }
    
    .market-info {
        font-size: 10px;
    }

    .header-title h1 {
        font-size: 1.5rem;
    }

    .header-stats {
        flex-direction: column;
        gap: 15px;
    }

    .header-stat {
        border-right: none;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
        padding-bottom: 10px;
    }

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

    .table-wrapper {
        max-height: 400px;
    }

    th {
        padding: 8px;
        font-size: 0.75rem;
    }

    td {
        padding: 8px;
        font-size: 0.75rem;
    }
}