* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dark Mode - Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #e0e0e0;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(219, 127, 48, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 87, 95, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(219, 127, 48, 0.1) 0%, transparent 50%);
    animation: backgroundPulse 20s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid rgba(219, 127, 48, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(219, 127, 48, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(219, 127, 48, 0.7), transparent);
    animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

h1 {
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(135deg, #db7f30 0%, #f5575f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(219, 127, 48, 0.5);
    filter: drop-shadow(0 0 6px rgba(219, 127, 48, 0.45));
    animation: pulseGlow 2s ease-in-out infinite;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(219, 127, 48, 0.45)); }
    50% { filter: drop-shadow(0 0 12px rgba(219, 127, 48, 0.7)); }
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(219, 127, 48, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(219, 127, 48, 0.3);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.status-dot.connected {
    background: #db7f30;
    box-shadow: 0 0 15px rgba(219, 127, 48, 0.8);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

#statusText {
    font-weight: 600;
    color: #e0e0e0;
}

.runtime-text {
    color: #db7f30;
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(219, 127, 48, 0.3);
}

/* Section Styles */
section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(219, 127, 48, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(219, 127, 48, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(219, 127, 48, 0.7), transparent);
    animation: sectionGlow 3s ease-in-out infinite;
}

@keyframes sectionGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

section:hover {
    border-color: rgba(219, 127, 48, 0.5);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6), 0 0 60px rgba(219, 127, 48, 0.2);
    transform: translateY(-2px);
}

h2 {
    font-size: 1.8em;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(219, 127, 48, 0.3);
    color: #e0e0e0;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(219, 127, 48, 0.3);
}

/* Wallet Section */
.wallet-section {
    margin-bottom: 30px;
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

@media (min-width: 1200px) {
    .wallet-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.wallet-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(219, 127, 48, 0.2);
    box-shadow: 0 2px 8px rgba(219, 127, 48, 0.1);
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(219, 127, 48, 0.1), transparent);
    transition: left 0.5s ease;
}

.wallet-card:hover::before {
    left: 100%;
}

.wallet-card:hover {
    transform: translateY(-5px);
    border-color: rgba(219, 127, 48, 0.5);
    box-shadow: 0 8px 25px rgba(219, 127, 48, 0.3), 0 0 40px rgba(219, 127, 48, 0.15);
}

.wallet-card.highlight {
    background: linear-gradient(135deg, rgba(219, 127, 48, 0.15) 0%, rgba(245, 87, 95, 0.15) 100%);
    border: 2px solid rgba(219, 127, 48, 0.5);
    box-shadow: 0 4px 20px rgba(219, 127, 48, 0.4), 0 0 50px rgba(219, 127, 48, 0.2);
}

.wallet-label {
    font-size: 0.9em;
    color: #6b7280;
    margin-bottom: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #e0e0e0;
    text-shadow: 0 0 10px rgba(219, 127, 48, 0.3);
}

.wallet-value.positive {
    color: #db7f30;
    text-shadow: 0 0 15px rgba(219, 127, 48, 0.6);
}

.wallet-value.negative {
    color: #ef4444;
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
}

/* Scrollbar für scrollbare Tabellen */
.table-container-scrollable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(219, 127, 48, 0.5) rgba(26, 26, 26, 0.5);
}

.table-container-scrollable::-webkit-scrollbar {
    height: 8px;
}

.table-container-scrollable::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.5);
    border-radius: 4px;
}

.table-container-scrollable::-webkit-scrollbar-thumb {
    background: rgba(219, 127, 48, 0.5);
    border-radius: 4px;
}

.table-container-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(219, 127, 48, 0.7);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a1a;
}

.data-table thead {
    background: rgba(219, 127, 48, 0.1);
    border-bottom: 2px solid rgba(219, 127, 48, 0.3);
}

.data-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #db7f30;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(219, 127, 48, 0.2);
}

.data-table th:last-child {
    border-right: none;
}

.data-table tbody tr {
    border-bottom: 1px solid rgba(219, 127, 48, 0.1);
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(219, 127, 48, 0.05);
    box-shadow: 0 2px 8px rgba(219, 127, 48, 0.1);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table td {
    padding: 12px;
    color: #e0e0e0;
    font-size: 0.9em;
    border-right: 1px solid rgba(219, 127, 48, 0.1);
}

.data-table td:last-child {
    border-right: none;
}

.data-table .token-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    word-break: break-all;
    max-width: 300px;
    user-select: all;
    border-radius: 4px;
    padding: 2px 6px;
    background: rgba(156, 163, 175, 0.05);
    border: 1px solid rgba(156, 163, 175, 0.1);
}

.data-table .token-cell:hover {
    color: #db7f30;
    text-shadow: 0 0 8px rgba(219, 127, 48, 0.5);
    background: rgba(219, 127, 48, 0.15);
    border-color: rgba(219, 127, 48, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(219, 127, 48, 0.2);
}

.data-table .token-cell:active {
    transform: translateY(0px);
    box-shadow: 0 1px 4px rgba(219, 127, 48, 0.3);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.in-pos {
    background: rgba(219, 127, 48, 0.2);
    color: #db7f30;
    border: 1px solid rgba(219, 127, 48, 0.4);
}

.status-badge.wait-buy {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.status-badge.wait-sell {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Profit Colors */
.profit-positive {
    color: #db7f30;
    font-weight: 700;
}

.profit-negative {
    color: #ef4444;
    font-weight: 700;
}

/* DEX Status Styles */
.dex-status-approved {
    color: #db7f30;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dex-status-processing {
    color: #fbbf24;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dex-status-unknown {
    color: #6b7280;
    font-weight: 400;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}

/* Trade Cards für Arbitrage Simulator */
.trades-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.trade-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(219, 127, 48, 0.2);
    transition: all 0.3s ease;
}

.trade-card:hover {
    border-color: rgba(219, 127, 48, 0.5);
    box-shadow: 0 4px 20px rgba(219, 127, 48, 0.2);
    transform: translateY(-2px);
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(219, 127, 48, 0.2);
}

.trade-symbol {
    font-size: 1.2em;
    font-weight: 700;
    color: #db7f30;
    text-shadow: 0 0 8px rgba(219, 127, 48, 0.4);
}

.trade-pnl {
    font-size: 1.1em;
    font-weight: 700;
}

.trade-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.trade-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.85em;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1em;
    color: #e0e0e0;
    font-weight: 600;
}

.trade-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(219, 127, 48, 0.1);
}

.trade-time {
    font-size: 0.85em;
    color: #6b7280;
}

.copy-btn {
    background: rgba(219, 127, 48, 0.1);
    border: 1px solid rgba(219, 127, 48, 0.3);
    color: #db7f30;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(219, 127, 48, 0.2);
    border-color: rgba(219, 127, 48, 0.5);
}

.wallet-value-small {
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 4px;
}

/* Footer */
footer {
    text-align: center;
    padding: 25px;
    color: #6b7280;
    font-size: 0.9em;
    margin-top: 30px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid rgba(219, 127, 48, 0.2);
}

#lastUpdate {
    color: #db7f30;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(219, 127, 48, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px 10px;
    }

    h1 {
        font-size: 1.2em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 15px;
    }
    
    .wallet-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .wallet-card {
        padding: 15px;
    }
    
    .wallet-value {
        font-size: 1.3em;
    }
    
    section {
        padding: 15px;
    }
    
    .data-table {
        font-size: 0.8em;
        min-width: 1000px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    .table-container-scrollable {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: rgba(219, 127, 48, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(219, 127, 48, 0.7);
}

/* Top Holder Prozent Farben */
.top-holder-green {
    color: #db7f30;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(219, 127, 48, 0.5);
}

.top-holder-orange {
    color: #f59e0b;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.top-holder-red {
    color: #ef4444;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}