:root {
    --background-color: #f8f9fa00;
    --text-color: #dff7df;
    --card-background: #ffffff00;
    --header-background: #ffffff00;
    --sidebar-background: #ffffff00;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --table-header-background: #007bff;
    --table-header-text: #ccdfcc;
    --profit-color: rgb(73, 216, 73);
    --loss-color: rgb(252, 58, 58);
    --status-card-background: #ffffff00;
    --status-card-border: 5px solid #007bff;
    --earnings-card-background: #ffffff00;
    --earnings-card-border: 5px solid #2e7d32;
    --overlay-background: rgba(0, 0, 0, 0.822);
    --spinner-border: 10px solid #f3f3f3;
    --spinner-border-top: 10px solid #2e7d32;
}

/* Base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Layout */
.dashboard {
    background-color: var(--header-background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 90px;
    margin: 5px;
}

.sidebar {
    width: 300px;
    background-color: var(--sidebar-background);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 15px;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    width: 100%;
    padding-top: 20px;
    margin-left: 10px;
}

.main-content .container {
    max-width: 100vw !important;
}

/* Navigation elements */
.logo,
.toggle-button,
.export-button,
.start-game,
.getting-started,
.what-is-safe-trader,
.import-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

#export_csv {
    margin-top: 5px;
}

.logo img,
.logo-small img {
    max-width: 100%;
    max-height: 300px;
}

.logo-small img {
    width: 100px;
    max-height: 100px;
    margin: auto;
}

/* Buttons */
.toggle-button button,
.export-button button,
.import-button button,
.start-game button,
.getting-started button,
.what-is-safe-trader button {
    font-weight: bold;
    border-radius: 10px;
    width: 100%;
    height: 50px;
}

.toggle-button button {
    font-size: 18px;
}

.export-button button,
.import-button button,
.start-game button,
.getting-started button,
.what-is-safe-trader button {
    font-size: 13px;
}

#userAreaSubscribe {
    margin-bottom: 10px;
    width: 100%;
}

.user-info.card {
    margin-top: 10px;
}

/* Cards */
.card {
    margin-bottom: 8px;
    box-shadow: var(--card-shadow);
    border: none;
    border-radius: 10px;
    overflow: visible;
    background-color: var(--card-background);
}

.card-header {
    background-color: var(--table-header-background);
    color: white;
    padding: 15px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-align: center;
}

.card-header:first-child {
    border-radius: 10px !important;
}

.card-body {
    padding: 8px;
    overflow-y: visible;
}

/* Table styles */
.table,
.dashboard {
    color: var(--text-color);
    font-weight: bold;
}

.table:first-child {
    cursor: pointer !important;
}

.table-responsive {
    overflow-x: auto;
}

.scrollable-table {
    max-height: 300px;
    overflow-y: auto;
    display: block;
}

tbody tr {
    cursor: default !important;
}

/* Status and earnings cards */
.status-card,
.earnings-card {
    border-top-width: 1px;
    border-bottom-width: 1px;
    border-right-width: 1px;
    padding: 8px;
    margin-top: 10px;
    border-radius: 5px;
    text-align: left;
}

.status-card {
    background-color: var(--status-card-background);
    border: var(--status-card-border);
}

.earnings-card {
    background-color: var(--earnings-card-background);
    border: var(--earnings-card-border);
}

.earnings-card h5 {
    font-weight: bolder;
    font-size: 16px;
    margin: auto;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 10px;
    width: 100%;
}

.earnings-card .card {
    background: #054e0ae3;
}

.earnings-card p {
    margin-bottom: 0px;
}

/* Form elements */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: var(--card-background);
    color: var(--text-color);
}

/* Special forms */
#settingsCollapse,
#configForm,
#createExperimentModal {
    overflow-y: visible;
}

#settingsCollapse .card-body,
#configForm {
    padding-bottom: 20px;
}

#settingsCollapse .form-control {
    background-color: transparent;
}

#configForm .form-control,
#createExperimentModal .form-control {
    height: 3.5rem;
}

#configForm .form-group {
    margin-right: 10px;
}

#configSchema {
    height: 15rem !important;
}

#accessKeysModal .modal-body {
    height: 600px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Color indicators */
.profit {
    color: var(--profit-color) !important;
    font-weight: bold;
}

.loss {
    color: var(--loss-color) !important;
    font-weight: bold;
}

/* Balance and messages */
.balance-message {
    font-weight: bolder;
    font-size: 14px;
    padding: 20px;
    margin: 20px;
    line-height: 4rem;
}

/* Modal and overlay */
.modal-content {
    background-color: #054e0ae7;
    color: var(--text-color);
    text-align: left;
}

.modal-backdrop.show {
    opacity: .7 !important;
}

#spinnerOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--overlay-background);
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

#spinner {
    border: var(--spinner-border);
    border-top: var(--spinner-border-top);
    border-radius: 50%;
    width: 250px;
    height: 250px;
    margin: auto;
    margin-top: 250px;
    animation: spin 1s linear infinite;
    z-index: 9999;
}

#gameContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Footer and copyright */
.copyright-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    height: 50px;
}

.copyright-notice a {
    color: #4da6ff;
    text-decoration: none;
}

.copyright-notice a:hover {
    text-decoration: underline;
}

.footer-disclaimer {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5vh;
}

/* Special content areas */
.content-body {
    width: 99vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-bottom: 40px;
}

.hero-content {
    padding: 1rem;
    max-width: 800px;
}

.logo-animation {
    animation: float 6s ease-in-out infinite;
    max-width: 200px;
    margin: 1rem auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    border-radius: 100px;
    background-color: rgba(255, 255, 255, .3);
}

/* Buttons (landing and login) */
.btn-landing {
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: bold;
    margin: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    font-size: 14px;
}

.btn-landing:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0, 1);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.btn-landing:hover:before {
    transform: scale(1, 1);
}

.btn-login {
    background: #4CAF50;
    border: 2px solid #4CAF50;
}

.btn-founder {
    background: transparent;
    border: 2px solid white;
    color: #80c580;
}

/* Feature cards */
.feature-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    margin: 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
    cursor: default;
}

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

/* Navigation links */
.nav-links {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Particles animation */
.particles {
    background: linear-gradient(135deg, #000000, #032205, #000000);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow-y: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: float 8s infinite ease-in-out;
}

/* Alerts and notifications */
.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

#tradingActiveAlert {
    margin: 5px;
}

#experimentNotification {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.download-qa-data {
    margin-bottom: 5px;
}

/* Audit links */
.audit-link {
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
}

/* Code formatting */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Bot details */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 20px;
}

.badge-success {
    line-height: 2rem;
}

#earnings-prose {
    font-size: 16px;
    font-weight: 300;
}

#earnings-prose strong {
    font-weight: 600;
}

#keyScope {
    height: 3rem;
}



/* Buttons with uppercase text */
.btn-primary,
.btn-danger,
.card-header,
.btn-dark,
.badge-success,
.btn-warning,
.btn-info {
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover {
    opacity: 0.9;
}

/* Data cards */
.data-card {
    min-height: 150px;
}

.balance-table {
    margin-bottom: 0 !important;
}

.transaction-row:hover {
    background-color: #f1f1f1;
}

/* Modal width override */
#comparisonModal {
    --bs-modal-width: 90% !important;
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(-10px);
    }

    50% {
        transform: translateY(10px);
    }

    100% {
        transform: translateY(-10px);
    }
}

/* Responsive design */
@media (max-width: 768px) {

    .header {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .dashboard {
        position: inherit;
    }

    .particles {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
    }

    .main-content {
        width: 100%;
        padding: 10px;
        margin-left: 0;
    }

    .main-content {
        height: unset;
        min-height: 100vh;
        max-height: none;
        padding: 20px 10px;
        padding-bottom: 100px;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .toggle-button button {
        height: auto;
        margin: 10px;
        width: 100%;
        line-height: 3rem;
    }

    .copyright-notice {
        height: 50px;
    }

    .hero-content {
        padding: 0.5rem;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    .feature-card {
        margin: 0.5rem 0;
    }

    .btn-landing {
        padding: 8px 16px;
        font-size: 12px;
    }

    .footer-disclaimer {
        height: 10vh;
        position: relative;
    }

    .list-group-item {
        background-color: #ffffff2e;
    }

    .card-body {
        background-color: #054e0ae7;
    }
}