* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0a0e27;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
    padding: 20px 30px;
    border-bottom: 2px solid #2a3f5f;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left {
    flex: 1;
}

.header h1 {
    font-size: 26px;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.file-input-container {
    position: relative;
}

.file-input {
    display: none;
}

.file-input-label {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #0a0e27;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-help {
    padding: 10px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-help:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.header-center {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background: rgba(42, 63, 95, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.account-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.account-label {
    font-size: 11px;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-value {
    font-size: 16px;
    font-weight: 600;
    color: #00d4ff;
    margin-top: 2px;
}

.info-separator {
    width: 1px;
    height: 40px;
    background: rgba(0, 212, 255, 0.2);
}

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

.modal-content {
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1429 100%);
    margin: 10% auto;
    padding: 0;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

.modal-header h2 {
    color: #00d4ff;
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #8892b0;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #00d4ff;
}

.modal-body {
    padding: 25px;
}

.modal-body ol {
    list-style-position: inside;
    line-height: 2;
    color: #e0e0e0;
}

.modal-body li {
    margin-bottom: 10px;
}

/* ===== TRADER NAME SECTION ===== */
.trader-name-section {
    padding: 20px 30px;
    background: rgba(42, 63, 95, 0.2);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.trader-name-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.trader-name-container label {
    color: #8892b0;
    font-size: 14px;
    font-weight: 600;
}

.trader-name-container input {
    flex: 1;
    max-width: 300px;
    padding: 10px 15px;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    transition: all 0.3s ease;
}

.trader-name-container input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.btn-small {
    padding: 10px 16px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #0a0e27;
    font-weight: 600;
    font-size: 13px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.branding-section {
    margin-left: auto;
    padding-left: 25px;
    border-left: 1px solid rgba(0, 212, 255, 0.15);
    text-align: right;
}

.branding-section a:hover {
    color: #00ff88;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 30px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    overflow-y: auto;
}

/* ===== KEY METRICS ===== */
.key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.8) 0%, rgba(15, 20, 41, 0.6) 100%);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-value.positive {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-value.negative {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-label {
    font-size: 13px;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===== CHART SECTION ===== */
.chart-section {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.6) 0%, rgba(15, 20, 41, 0.4) 100%);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

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

.chart-header h2 {
    font-size: 20px;
    color: #00d4ff;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.btn-export {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-export[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 14, 39, 0.98);
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-in;
}

.btn-export[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(10, 14, 39, 0.98);
    z-index: 1000;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-in;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.btn-flex {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-flex:hover {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.chart-container {
    position: relative;
    height: 300px;
    background: rgba(10, 14, 39, 0.4);
    border-radius: 8px;
    padding: 15px;
}

/* ===== DETAILED STATS ===== */
.detailed-stats {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.4) 0%, rgba(15, 20, 41, 0.2) 100%);
    border: 2px solid rgba(0, 212, 255, 0.15);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}

.stats-toggle {
    width: 100%;
    padding: 18px 25px;
    background: transparent;
    border: none;
    color: #00d4ff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.stats-toggle:hover {
    background: rgba(0, 212, 255, 0.05);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.stats-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.stats-content {
    padding: 0 25px 25px 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(10, 14, 39, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.stat-item .stat-label {
    font-size: 12px;
    color: #8892b0;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #00d4ff;
}

.stat-item .stat-value.positive {
    color: #00ff88;
}

.stat-item .stat-value.negative {
    color: #ff4444;
}

.stat-item .stat-value.warning {
    color: #ffaa00;
}

/* ===== TRADES CONTAINER ===== */
.trades-container {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.4) 0%, rgba(15, 20, 41, 0.2) 100%);
    border: 2px solid rgba(0, 212, 255, 0.15);
    border-radius: 12px;
    padding: 25px;
}

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

.trades-header h2 {
    font-size: 20px;
    color: #00d4ff;
}

.filter-container {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: #8892b0;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.filter-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    color: #0a0e27;
    border-color: transparent;
}

.trades-list {
    display: grid;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar */
.trades-list::-webkit-scrollbar {
    width: 8px;
}

.trades-list::-webkit-scrollbar-track {
    background: rgba(10, 14, 39, 0.4);
    border-radius: 10px;
}

.trades-list::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 10px;
}

.trades-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* ===== TRADE CARD ===== */
.trade-card {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.6) 0%, rgba(15, 20, 41, 0.4) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 18px;
    transition: all 0.3s ease;
}

.trade-card:hover {
    transform: translateX(5px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.15);
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.trade-symbol {
    font-size: 16px;
    font-weight: 700;
    color: #00d4ff;
}

.trade-pnl {
    font-size: 18px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
}

.trade-pnl.profit {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.trade-pnl.loss {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.trade-pnl.neutral {
    color: #8892b0;
    background: rgba(136, 146, 176, 0.1);
}

.trade-details {
    display: grid;
    gap: 10px;
}

.trade-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.trade-label {
    color: #8892b0;
    font-weight: 500;
}

.trade-value {
    color: #e0e0e0;
    font-weight: 600;
}

.trade-value.profit-text {
    color: #00ff88;
}

.trade-value.loss-text {
    color: #ff4444;
}

.trade-value.warning-text {
    color: #ffaa00;
}

.trade-value.small-text {
    font-size: 11px;
    color: #8892b0;
}

/* ===== NO DATA STATE ===== */
.no-data-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 30px;
}

.no-data {
    text-align: center;
    max-width: 500px;
}

.no-data-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-data p {
    font-size: 16px;
    color: #8892b0;
    line-height: 1.6;
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
    background: #0a0e27;
    padding: 15px 30px;
    text-align: center;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    font-size: 13px;
    color: #8892b0;
}

.footer a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #00ff88;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    top: 100px;
    right: 30px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #0a0e27;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4);
    z-index: 2000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(400px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

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

    .info-separator {
        width: 100%;
        height: 1px;
    }

    .key-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric-value {
        font-size: 28px;
    }

    .chart-container {
        height: 250px;
    }

    .trades-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-container {
        justify-content: center;
    }

    .main-content {
        padding: 20px 15px;
    }
}
