/* Custom CSS for XBit Trading Platform */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Forms */
.form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-control:hover {
    border-color: #ced4da;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.input-group-text {
    border-radius: 12px 0 0 12px;
    border: 2px solid #e9ecef;
    border-right: none;
    background-color: #f8f9fa;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 12px 12px 0;
}

.input-group:hover .input-group-text {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

/* Form Labels */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-label.fw-bold {
    font-weight: 700;
    color: #343a40;
}

/* Form Text */
.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}

/* Select Elements */
.form-select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-select:hover {
    border-color: #ced4da;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

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

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: 600;
}

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

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

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

/* Stats Cards */
.stat-item {
    padding: 20px;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Feature Cards */
.feature-card {
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    text-align: center;
}

/* Step Cards */
.step-card {
    padding: 30px 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

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

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
}

.bg-gradient-info {
    background: linear-gradient(135deg, var(--info-color), #6f42c1);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, var(--danger-color), #e83e8c);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .form-control {
        background-color: #3d3d3d;
        border-color: #4d4d4d;
        color: #ffffff;
    }
    
    .form-control:focus {
        background-color: #3d3d3d;
        border-color: var(--primary-color);
        color: #ffffff;
    }
    
    .input-group-text {
        background-color: #3d3d3d;
        border-color: #4d4d4d;
        color: #ffffff;
    }
}

/* Desktop Modal Styles */
@media (min-width: 992px) {
    .modal-content {
        background-color: #1a1a1a !important;
        color: white !important;
        border: 1px solid #333 !important;
    }
    
    /* Override any JavaScript inline styles */
    .modal-content[style*="background"] {
        background-color: #1a1a1a !important;
    }
    
    .modal[style*="background"] {
        background-color: #1a1a1a !important;
    }
    
    .modal-body {
        background-color: #1a1a1a !important;
        color: white !important;
    }
    
    .modal-footer {
        background-color: #1a1a1a !important;
        border-top: 1px solid #333 !important;
    }
    
    .modal-body .form-control {
        background-color: #2d2d2d !important;
        border-color: #444 !important;
        color: white !important;
    }
    
    .modal-body .form-control:focus {
        background-color: #2d2d2d !important;
        border-color: var(--primary-color) !important;
        color: white !important;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    }
    
    .modal-body .form-label {
        color: #ffffff !important;
    }
    
    .modal-body .text-muted {
        color: #6c757d !important;
    }
    
    .modal-body .btn {
        color: white !important;
    }
    
    .modal-body .btn-outline-primary {
        color: #007bff !important;
        border-color: #007bff !important;
    }
    
    .modal-body .btn-outline-primary:hover {
        background-color: #007bff !important;
        color: white !important;
    }
    
    .modal-body .btn-outline-success {
        color: #28a745 !important;
        border-color: #28a745 !important;
    }
    
    .modal-body .btn-outline-success:hover {
        background-color: #28a745 !important;
        color: white !important;
    }
    
    .modal-body .btn-outline-warning {
        color: #ffc107 !important;
        border-color: #ffc107 !important;
    }
    
    .modal-body .btn-outline-warning:hover {
        background-color: #ffc107 !important;
        color: #000 !important;
    }
    
    .modal-body .btn-outline-info {
        color: #17a2b8 !important;
        border-color: #17a2b8 !important;
    }
    
    .modal-body .btn-outline-info:hover {
        background-color: #17a2b8 !important;
        color: white !important;
    }
    
    .modal-body .btn-outline-danger {
        color: #dc3545 !important;
        border-color: #dc3545 !important;
    }
    
    .modal-body .btn-outline-danger:hover {
        background-color: #dc3545 !important;
        color: white !important;
    }
    
    .modal-body .text-white {
        color: #ffffff !important;
    }
    
    .modal-body .text-white-75 {
        color: #cccccc !important;
    }
    
    .modal-body .text-white-50 {
        color: #999999 !important;
    }
    
    .modal-body .text-secondary {
        color: #6c757d !important;
    }
    
    .modal-body .text-success {
        color: #28a745 !important;
    }
    
    .modal-body .text-warning {
        color: #ffc107 !important;
    }
    
    .modal-body .text-info {
        color: #17a2b8 !important;
    }
    
    .modal-body .text-danger {
        color: #dc3545 !important;
    }
    
    .modal-body .text-primary {
        color: #007bff !important;
    }
    
    .modal-body .alert {
        background-color: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }
    
    .modal-body .alert-success {
        background-color: rgba(40, 167, 69, 0.1) !important;
        border-color: #28a745 !important;
        color: #28a745 !important;
    }
    
    .modal-body .alert-warning {
        background-color: rgba(255, 193, 7, 0.1) !important;
        border-color: #ffc107 !important;
        color: #ffc107 !important;
    }
    
    .modal-body .alert-info {
        background-color: rgba(23, 162, 184, 0.1) !important;
        border-color: #17a2b8 !important;
        color: #17a2b8 !important;
    }
    
    .modal-body .alert-danger {
        background-color: rgba(220, 53, 69, 0.1) !important;
        border-color: #dc3545 !important;
        color: #dc3545 !important;
    }
    
    .modal-body .card {
        background-color: #2d2d2d !important;
        border: 1px solid #444 !important;
        color: white !important;
    }
    
    .modal-body .card-header {
        background-color: #333 !important;
        border-bottom: 1px solid #444 !important;
        color: white !important;
    }
    
    .modal-body .card-body {
        background-color: #2d2d2d !important;
        color: white !important;
    }
    
    .modal-body .list-group-item {
        background-color: #2d2d2d !important;
        border-color: #444 !important;
        color: white !important;
    }
    
    .modal-body .list-group-item:hover {
        background-color: #3d3d3d !important;
    }
    
    .modal-body .table {
        color: white !important;
    }
    
    .modal-body .table th {
        background-color: #333 !important;
        border-color: #444 !important;
        color: white !important;
    }
    
    .modal-body .table td {
        background-color: #2d2d2d !important;
        border-color: #444 !important;
        color: white !important;
    }
    
    .modal-body .table-striped tbody tr:nth-of-type(odd) {
        background-color: #333 !important;
    }
    
    .modal-body .table-hover tbody tr:hover {
        background-color: #3d3d3d !important;
    }
}
