/* Enhanced theme system with crypto-inspired design */
:root {
    /* Light theme (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-tertiary: #6b7280;
    --border-color: #d1d5db;
    --accent-blue: #2563eb;
    --accent-green: #059669;
    --accent-purple: #7c3aed;
    --accent-red: #dc2626;
    --accent-orange: #d97706;
    
    /* Gradient backgrounds */
    --gradient-primary: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --gradient-success: linear-gradient(135deg, var(--accent-green), #06d6a0);
    --gradient-warning: linear-gradient(135deg, var(--accent-orange), #fbbf24);
    --gradient-danger: linear-gradient(135deg, var(--accent-red), #f87171);
    
    /* Crypto-specific colors */
    --bitcoin: #f7931a;
    --ethereum: #627eea;
    --binance: #f0b90b;
    --cardano: #0033ad;
    --solana: #14f195;
    --polygon: #8247e5;
}

/* Dark theme variables */
.dark-theme {
    --bg-primary: #0a0b0f;
    --bg-secondary: #1a1b23;
    --bg-tertiary: #0f1419;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --border-color: #374151;
    --accent-blue: #1e40af;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
}

/* Base theme styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Card components */
.theme-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-card-darker {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Text styles */
.theme-text-primary {
    color: var(--text-primary);
}

.theme-text-secondary {
    color: var(--text-secondary);
}

.theme-text-tertiary {
    color: var(--text-tertiary);
}

/* Button styles */
.theme-btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.theme-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

.theme-btn-success {
    background: var(--gradient-success);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.theme-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* Crypto asset cards with themed colors */
.crypto-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crypto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.crypto-card:hover::before {
    opacity: 1;
}

.crypto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Special crypto-themed elements */
.bitcoin-accent {
    color: var(--bitcoin);
}

.ethereum-accent {
    color: var(--ethereum);
}

.binance-accent {
    color: var(--binance);
}

/* Theme toggle button styles */
#theme-toggle {
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Trading interface specific styles */
.trading-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    position: relative;
}

.trading-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-success);
}

/* Profit/Loss indicators */
.profit-indicator {
    color: var(--accent-green);
    font-weight: bold;
}

.loss-indicator {
    color: var(--accent-red);
    font-weight: bold;
}

/* Animated elements */
.glow-effect {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
    }
}

/* Responsive theme adjustments */
@media (max-width: 768px) {
    #theme-toggle {
        top: 16px;
        right: 16px;
        padding: 8px 12px;
    }
    
    #theme-toggle span {
        display: none;
    }
}

/* Form elements themed */
.theme-input {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    outline: none;
}

.theme-input::placeholder {
    color: var(--text-tertiary);
}

/* Modal overlays */
.theme-modal {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.theme-modal-overlay {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

/* Status indicators */
.status-online {
    background-color: var(--accent-green);
    color: white;
}

.status-pending {
    background-color: var(--accent-orange);
    color: white;
}

.status-offline {
    background-color: var(--accent-red);
    color: white;
}

/* Loading animations */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

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