* {
    margin: 0;
    box-sizing: border-box;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f4;
    padding: 0;
}

header {
    background-color: #1e3c72;
    color: white;
    padding: 15px 0;
    text-align: center;
    width: 100vw;
}

footer {
    background-color: #1e3c72;
    color: white;
    padding: 10px 0;
    text-align: center;
    width: 100vw;
}

.container {
    display: flex;
    width: 350px;
    flex-direction: column;
    width: 100%;
    gap: 25px;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.container2 {
    /* height: 372px; */
    display: flex;
    width: 100%;
    /* padding: 20px; */
    border-radius: 5px;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.flip-card {
    background-color: transparent;
    width: 350px;
    height: 350px;
    perspective: 1000px;
    margin-bottom: 60px;
    z-index: 1;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.flip-card-front {
    background-color: white;
    color: black;
}

.flip-card-back {
    background-color: #1e3c72;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 392.94px;
    padding: 5px;
}

.settings-button {
    background-color: #5a9bd3;
    /* Lighter blue color */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    transform: translateY(-50%);
    /* position: relative;
    bottom: 390px;
    right: -135px;
    z-index: 0; */
    /* Center vertically */
}

.settings-button:active {
    transform: translateY(-25px);
}

#note {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
}

button {
    display: block;
    margin-top: 20px;
    background-color: #1e3c72;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

#result {
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 20px;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
    background-color: #f9f9f9;
}

#resultContainer {
    max-width: 700px;
    min-height: 140px;
}

#checkProfitability {
    display: flex;
    justify-content: center;
}

#formulaParameters {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.assetInfo {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    min-width: 50vw;
    margin-top: 20px;
}

.scan-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12.5px;
}

.toggle-button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
}

.toggle-button.active {
    background-color: #dc3545;
}

#scanInterval {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

#flagResult {
    text-align: center;
    min-width: 310px;
    min-height: 24px;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.loading-content {
    text-align: center;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.settings-group {
    margin-bottom: 15px;
    text-align: left;
}

.settings-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.settings-group select,
.settings-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    color: black;
}

.settings-group input[type="checkbox"] {
    margin-right: 5px;
}

#saveSettings {
    margin-top: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#saveSettings:hover {
    background-color: #45a049;
}

#consensusValue,
#singularValue {
    text-transform: capitalize;
}

/* Dark theme styles */
body.dark-theme {
    background-color: #222;
    color: #2b0b0b;
}

.dark-theme .container,
.dark-theme .flip-card-front {
    background-color: #333;
    color: #fff;
}

.dark-theme .flip-card-back {
    background-color: #444;
    color: #fff;
}

.dark-theme .settings-group select,
.dark-theme .settings-group input[type="text"] {
    background-color: #555;
    color: #fff;
    border-color: #777;
}

.dark-theme header,
.dark-theme footer {
    background-color: #111;
}

/* The Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
}

/* The Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

#confirm-erase:hover,
#confirm-cancel:hover,
.eraseLogs2:hover,
#seeLogs:hover,
#checkProfitability:hover {
    background-color: #166396;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#erase-logs {
    margin-top: 0px;
}

#log-erase-btn {
    display: flex;
    justify-content: space-evenly;
}

.btnDisabled {
    background-color: #cecece;
}

.no-pointer {
    pointer-events: none;
    cursor: default;
    /* or cursor: not-allowed; */
}

#log-title2,
#log-title {
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

.log-entry {
    border: 1px solid #1e3c72;
    border-radius: 5px;
    padding: 5px;
}

#log-confirm-btns {
    display: flex;
    flex-direction: column;
}

.no-logs {
    border: none;
    display: none;
}

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

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

@media only screen and (max-width: 768px) {

    header,
    footer {
        min-width: 0;
    }

    #result {
        margin-top: 25px;
    }

}