body {
    background-color: #222;
    color: #fff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    /*min-height: 116vh; /* Ensure the body fills the viewport height */
}

ul {
    list-style-type: none;
    padding: 0;
}
ul li {
    padding: 5px 0;
}

#top-bar {
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.top-bar-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

#top-bar img {
    width: 50px;
    margin-right: 10px;
}

#top-bar label,
#top-bar input{
    margin-right: 10px;
}

.control-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.control-panel label,
.control-panel input,
.control-panel select {
    margin-right: 10px;
}

.control-panel label {
    font-size: 14px;
}

.control-panel input,
.control-panel select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #4CAF50;
    background-color: #333;
    color: #fff;
}

.control-panel label, .control-panel input, .control-panel select {
    margin-right: 10px;
}

.stocks-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 90vh;
    gap: 20px;
    margin-bottom: 20px;
}

.stocks-container.greed-fear {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

.column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.stock-info {
    position: relative;
    background-color: #333;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    padding: 0.7%;
    width: 96%;
    max-width: 550px;
    justify-content: center;
    text-align: center;
}

.stock-info img {
    width: 60px;
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

.stock-info span {
    display: inline;
    align-items: center;
    margin-bottom: 10px;
    text-align: left;
}

.stock-info canvas {
    margin-top: 10px;
    max-width: 500px;
    max-height: 250px;
    align-content: center;
    /*margin-right: 70%;*/
}

.stock-info p {
    margin: 0 0 10px 0;
}

.technical-indicators {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.technical-indicators.show {
    max-height: 1000px;
}

.toggle-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    margin-right: 10px;
}

.toggle-button:hover {
    background-color: #2d6b2f;
}

.toggle-button:active {
    transform: scale(0.95);
}

#gearButton {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    font-size: 20px;
    transition: transform 0.3s ease;
}

#gearButton:hover {
    transform: scale(1.2); /* Scale up on hover */
}

#gearButton.spin {
    animation: spin 1s infinite linear; /* Animation for spinning */
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#sidebar {
    position: fixed;
    top: 0;
    right: -500px; /* Hidden position */
    width: 300px;
    height: 100%;
    background-color: #333;
    border-left: 2px solid #4CAF50;
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    transition: right 0.5s ease;
    z-index: 999;
}

#sidebar.show {
    right: 0; /* Visible position */
}

.hidden {
    display: block;
}

.info-element {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
    cursor: pointer; /* Optional: Add cursor pointer for better UX */
}

.info-element .info-text {
    visibility: hidden;
    width: 120px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    /* Position the tooltip */
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease; /* Smooth transition for opacity */
}

.info-element:hover .info-text {
    visibility: visible;
    opacity: 1;
}

.centered-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center; /* Horizontal center */
    align-items: center; /* Vertical center */
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 1000; /* Ensure it's above other content */
}

.centered-content img {
    max-width: 30%;
    max-height: 30%;
}

a {
    color: #4CAF50; /* Link color */
    text-decoration: none; /* Remove underline */
    transition: color 0.3s; /* Smooth color transition */
}

a:hover {
    color: #2d6b2f; /* Darker green on hover */
}

.canvas-overlay {
    position: fixed;
    top: 1%;
    left: 1%;
    width: 60%;
    height: 60%;
    background: #333;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align minimize button to the right */
}

.maximize-button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    position: absolute;
    bottom: 2%;
    left: 8%;
    z-index: 100; /* Ensure it is above the canvas overlay */
    color: white;
    background-color: #4CAF50; /* Optional: Add a background for better visibility */
    padding: 10px 15px;
    border-radius: 4px;
}

.minimize-button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    position: fixed;
    top: 2%;
    left: 3%;
    z-index: 1001; /* Ensure it is above the canvas overlay */
    color: white;
    background-color: #4CAF50; /* Optional: Add a background for better visibility */
    padding: 10px 15px;
    border-radius: 4px;
}

/* footer */
footer {
    background-color: #35373B;
    color: #ffffff;
}
footer a {
    color: #1fadff;
    text-decoration: none; /* Remove underline */
    font-weight: bold;
    transition: transform 0.25s ease, color 0.15s ease;
}
footer a:hover {
    color: #92d7ff;
    transform: scale(1.5); /* Zoom in by 5% */
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}
.footer-info {
    align-items: center;
    flex: 1; /* Allows equal distribution of space between each div */
    padding: 2px;
}
.footer-info h2 {
    text-align: center;
}
.footer-info li {
    text-align: center;
}
.footer-info .footer-li-images {
    align-items: center;
}
#copyright-info {
    text-align: center;
    margin-top: 0px;
}
#copyright-info p {
    margin-top: -10px;
    margin-bottom: 0px;
}
#copyright-branding-name {
    margin: 0 0 0 0; /* original 0px 5px 0px 0px -> removed */
}
@media (max-width: 930px) { /* 80% */
    .footer-info {
        padding: 1.5px; /* original 2px */
        flex: 0 1 auto; /* Disable flex: 1 and let items shrink to fit content */
    }
    .footer-info h2{
        font-size: 19.2px; /* original 24px */
        margin: 12.7488px 0px; /* original 15.936px 0px -> 70% */
    }
    #copyright-info,
    .footer-info a {
        font-size: 12.8px; /* original 16px */
        margin: 0 3.5px 0 0; /* original 0px 5px 0px 0px -> 70% */
    }
    .footer-info ul {
        margin-block-start: 0; /* Remove top margin */
        margin-block-end: 0; /* Remove bottom margin */
        padding-inline-start: 0; /* Remove left padding */
    }
    .footer-info li {
        padding: 3.5px 0px; /* original 5px 0px -> 70% */
    }
    img {
        width: 25.6px; /* original 32px */
        height: 25.6px; /* original 32px */
    }
} 
@media (max-width: 400px) { /* 70% */
    .footer-info {
        padding: 0px; /* removed */
    }
    .footer-info h2 { /* removed */
        font-size: 0px; 
        display: none;
        margin: 0;
        padding: 0;
    }
    .footer-info a {
        font-size: 12px; /* original 16px -> min legible text is 12px according to google (totest) */
        margin: 0 0 0 0; /* removed */
    }
    #copyright-info {
        font-size: 9px; /* original 16px */
        margin: 0 0 0 0; /* removed */
    }
    .footer-info li {
        padding: 0px 0px; /* original 5px 0px -> removed */
        margin: 0px; /* removed */
    }
    img {
        width: 22.4px; /* original 32px */
        height: 22.4px; /* original 32px */
    }
}
@media (max-width: 350px) { 
    #copyright-info p {
        margin-top: 0px; /* original -10px -> evade elements overlapping*/
    }
}