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

:root {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.6);
    --bg-card-hover: rgba(30, 30, 30, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #00ff9d; /* Neon Green */
    --accent-secondary: #7000ff; /* Deep Purple */
    --accent-red: #ff3b3b;
    --border-color: rgba(255, 255, 255, 0.05);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --glow: 0 0 20px rgba(0, 255, 157, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Glow Effect */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 255, 157, 0.05), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 32px 40px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.header-content h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #a0a0a0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.header-content h1 .highlight {
    background: linear-gradient(to right, var(--accent-primary), #00ccff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wallet-info {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

.wallet-address {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--accent-primary);
    border: 1px solid rgba(0, 255, 157, 0.1);
    transition: all 0.3s ease;
}

.wallet-address:hover {
    background: rgba(0, 255, 157, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
}

.last-update {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    border: var(--glass-border);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.stat-card:hover::before {
    transform: translateX(100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    font-family: 'JetBrains Mono', monospace;
}

.stat-value.positive { color: var(--accent-primary); text-shadow: 0 0 20px rgba(0, 255, 157, 0.3); }
.stat-value.negative { color: var(--accent-red); text-shadow: 0 0 20px rgba(255, 59, 59, 0.3); }

/* Chart Section */
.chart-section,
.trades-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

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

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.btn-chart,
.btn-filter {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-chart:hover,
.btn-filter:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-chart.active,
.btn-filter.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.4);
}

.chart-container {
    position: relative;
    height: 450px;
    width: 100%;
}

/* Trades Table */
.table-container {
    overflow-x: auto;
    border-radius: 16px;
    border: var(--glass-border);
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
}

.trades-table thead th {
    text-align: left;
    padding: 20px 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trades-table tbody td {
    padding: 20px 24px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-family: 'JetBrains Mono', monospace;
}

.trades-table tbody tr {
    transition: background 0.2s;
}

.trades-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.trade-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.trade-type.long {
    background: rgba(0, 255, 157, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 255, 157, 0.2);
}

.trade-type.short {
    background: rgba(255, 59, 59, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(255, 59, 59, 0.2);
}

.pnl-value {
    font-weight: 700;
}

.pnl-value.positive { color: var(--accent-primary); }
.pnl-value.negative { color: var(--accent-red); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 32px;
}

.btn-page {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-page:hover:not(:disabled) {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 157, 0.2);
}

.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 20px 16px; }
    .header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 20px;
        padding: 24px;
    }
    .stats-grid { grid-template-columns: 1fr; }
    .chart-container { height: 300px; }
    .trades-table { font-size: 12px; }
    .trades-table thead th, .trades-table tbody td { padding: 12px 16px; }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.chart-section,
.trades-section,
.positions-section {
    animation: fadeIn 0.5s ease-out;
}

/* Positions Section (Open Trades) */
.positions-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--accent-primary);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent-primary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.positions-table {
    background: rgba(0, 255, 157, 0.02);
}

.position-row {
    transition: all 0.3s ease;
}

.position-row:hover {
    background: rgba(0, 255, 157, 0.05) !important;
}

/* Price Flash Animations */
.price-cell {
    transition: all 0.3s ease;
    position: relative;
}

.price-cell.flash-up {
    animation: flashGreen 0.5s ease;
}

.price-cell.flash-down {
    animation: flashRed 0.5s ease;
}

@keyframes flashGreen {
    0% { background: transparent; }
    25% { background: rgba(0, 255, 157, 0.3); }
    100% { background: transparent; }
}

@keyframes flashRed {
    0% { background: transparent; }
    25% { background: rgba(255, 59, 59, 0.3); }
    100% { background: transparent; }
}

.current-price {
    font-weight: 600;
    font-size: 14px;
}

.no-positions {
    text-align: center;
    padding: 60px !important;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif !important;
}

.no-positions-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Positive/Negative text classes */
.positive { color: var(--accent-primary) !important; }
.negative { color: var(--accent-red) !important; }

/* Red color variable */
:root {
    --red: #ff3b3b;
}
