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 */
}

header {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

footer {
    text-align: center;
    margin-bottom: 0px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
}

.section-title {
    background-color: #4CAF50;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.section-title:hover {
    background-color: #2d6b2f;
    transform: scale(1.01);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    background-color: #333;
    padding: 0; /* Initially set padding to 0 */
    border: 1px solid #4CAF50;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}
.section-content.expanded {
    padding: 15px; /* Set padding when expanded */
}

audio, iframe {
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

video {
    width: 100%;
    height: auto; /* Ensures aspect ratio is maintained */
    max-width: 600px; /* Ensures videos do not exceed their original size */
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

h3 {
    margin-top: 20px;
}

#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;
    margin-left: 4px;
}

#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;
}

.hidden-input {
    display: none;
}

.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 */
}

a:visited {
    color: #8dc4a5; /* Visited link color */
}

.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;
}

#preview img {
    max-width: 60px;
    max-height: 60px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #4CAF50;
    border-radius: 4px;
}

#gif-preview img {
    max-width: 60px;
    max-height: 60px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #4CAF50;
    border-radius: 4px;
}

#gif-preview a {
    position: relative;
    display: inline-block;
}

#gif-preview a::after {
    content: "Click to download";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#gif-preview a:hover::after {
    opacity: 1;
}