/**
 * GMGN Copy Trade Backtester - Custom Styles
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-brand i {
    color: var(--success-color);
}

.nav-link {
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 0 5px;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    font-weight: 500;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

/* Stats Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    border: none;
}

.card-body h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    background-color: white;
}

.table thead {
    background-color: var(--light-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table td, .table th {
    vertical-align: middle;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
    border-radius: 6px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-positive {
    color: var(--success-color);
    font-weight: 600;
}

.text-negative {
    color: var(--danger-color);
    font-weight: 600;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   LOADING & SPINNERS
   ============================================ */
.spinner {
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .card-body h2 {
        font-size: 1.8rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
}

/* ============================================
   BACKTEST SPECIFIC
   ============================================ */
.filter-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.filter-section h6 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.preset-buttons .btn {
    margin: 0.25rem;
}

/* Results Section */
#resultsSection {
    margin-top: 2rem;
}

#resultsSection .card {
    animation: slideIn 0.5s ease;
}

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

/* ============================================
   CHARTS
   ============================================ */
.chart-container {
    position: relative;
    height: 400px;
    margin: 2rem 0;
}

/* ============================================
   TRADER CARD SPECIFIC
   ============================================ */
.trader-card {
    transition: all 0.3s ease;
}

.trader-card:hover {
    border-color: var(--primary-color) !important;
}

.trader-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--light-color);
}

.wallet-address {
    font-family: 'Courier New', monospace;
    background-color: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ============================================
   DARK MODE SUPPORT (optioneel)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* TODO: Implementeer dark mode styles */
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar, footer, .btn, .alert {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   SCROLLBAR STYLING (Chrome/Safari)
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* ============================================
   CUSTOM ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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