/* Virtual Trading Page Styles */

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
}

.page-header h2 {
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Status Badge */
.status-badge {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Badge Gradients */
.bg-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    font-weight: 600;
    font-size: 1.05rem;
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-header.bg-warning {
    background-color: #fff3cd !important;
    border-bottom-color: #ffe69c;
    color: #664d03;
}

.card-header.bg-secondary {
    background-color: #e2e3e5 !important;
    border-bottom-color: #d3d4d5;
    color: #41464b;
}

.card-body {
    padding: 1.25rem;
}

/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    font-size: 2.5rem;
}

.empty-state p {
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Form Elements */
.form-label {
    margin-bottom: 0.4rem;
    color: #495057;
    font-size: 0.9rem;
}

.form-label.fw-semibold {
    font-weight: 600;
}

.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Buttons */
.btn {
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #0e8078 0%, #2fcc67 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
}

.btn-outline-primary, .btn-outline-secondary, .btn-outline-danger {
    transition: all 0.3s ease;
}

.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tables */
.table {
    font-size: 0.9rem;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
    vertical-align: middle;
}

.table td {
    vertical-align: middle;
    padding: 0.6rem 0.75rem;
}

.table-hover tbody tr {
    transition: background-color 0.15s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* PnL Cells */
.pnl-cell {
    font-weight: 700;
    font-size: 0.95rem;
}

.pnl-pos {
    color: #198754;
}

.pnl-neg {
    color: #dc3545;
}

.table-success {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.table-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* WebSocket Status */
#ws-status {
    position: sticky;
    top: 0;
    z-index: 20;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-lg {
        padding: 0.65rem 1.25rem;
        font-size: 1rem;
    }

    .table {
        font-size: 0.8rem;
    }

    .table th, .table td {
        padding: 0.5rem 0.35rem;
    }
}

@media (max-width: 576px) {
    .status-badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .form-control, .form-select {
        font-size: 0.9rem;
    }
}

/* Textarea monospace */
.font-monospace {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

