/* Main Styles for User Interface */

:root {
    --primary: #2962ff;
    --primary-dark: #0039cb;
    --secondary: #1e222d;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ffb300;
    --info: #2196f3;
}

body {
    background-color: #0a0e17;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-content {
    padding: 20px;
    min-height: calc(100vh - 140px);
}

/* Cards */
.card {
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 12px;
    margin-bottom: 20px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #2a2e39;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border: none;
    padding: 10px 24px;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: #1b8a3d;
    border: none;
}

.btn-success:hover {
    background: #156e31;
}

.btn-danger {
    background: #c62828;
    border: none;
}

.btn-danger:hover {
    background: #b71c1c;
}

/* Form Controls */
.form-control, .form-select {
    background: #131722;
    border: 1px solid #2a2e39;
    color: #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    background: #131722;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(41, 98, 255, 0.25);
    color: #e0e0e0;
}

.form-control::placeholder {
    color: #6a6f7a;
}

/* Tables */
.table {
    color: #e0e0e0;
}

.table thead th {
    border-bottom: 1px solid #2a2e39;
    color: #a6abb6;
    font-weight: 500;
}

.table tbody td {
    border-bottom: 1px solid #2a2e39;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: #2a2e39;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
}

/* Trading Interface */
.trading-container {
    padding: 20px 0;
}

.chart-container {
    min-height: 500px;
    border-radius: 8px;
    overflow: hidden;
}

/* Wallet Balance Display */
.wallet-balance {
    background: linear-gradient(135deg, #1e222d, #2a2e39);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.wallet-balance .amount {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.wallet-balance .label {
    font-size: 14px;
    color: #a6abb6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stats Cards */
.stat-card {
    background: #1e222d;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 28px;
    font-weight: 700;
}

.stat-card .label {
    color: #a6abb6;
    font-size: 14px;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 10px;
    }
    
    .wallet-balance .amount {
        font-size: 24px;
    }
    
    .stat-card .number {
        font-size: 22px;
    }
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e222d;
}

::-webkit-scrollbar-thumb {
    background: #2a2e39;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Trade Buttons */
.trade-btn-up {
    background: linear-gradient(135deg, #1b8a3d, #0d5c28);
}

.trade-btn-down {
    background: linear-gradient(135deg, #c62828, #8e0000);
}

.trade-btn-up:hover, .trade-btn-down:hover {
    transform: scale(1.02);
}

/* Countdown Timer */
.timer {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.timer.urgent {
    color: #f44336;
    animation: pulse 1s infinite;
}