/* Basic Styling */
body { 
    font-family: system-ui, sans-serif; 
    background-color: #f8f9fa; 
    color: #333; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    min-height: 100vh; 
    padding: 20px; 
    box-sizing: border-box; 
    margin: 0; 
}
.content-container { 
    background-color: #ffffff; 
    padding: 20px 30px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    max-width: 900px; 
    width: 100%; 
    margin-bottom: 20px; 
}
.dashboard-container { 
    padding-top: 30px; 
    padding-bottom: 30px; 
}
h1, h2, h3 { 
    color: #0056b3; 
    margin-bottom: 15px; 
    text-align: center; 
}
h3, h4 { 
    margin-top: 25px; 
    margin-bottom: 10px; 
    text-align: left; 
    color: #0056b3; 
}
.gauge-container h3, .line-chart-container h3 { 
    text-align: center; 
}
p, ul { 
    color: #555; 
    line-height: 1.6; 
    text-align: left; 
    margin-bottom: 15px; 
}
ul { 
    list-style-position: outside; 
    padding-left: 20px; 
}
li { 
    margin-bottom: 8px; 
}
.data-notice { 
    font-style: italic; color: #555; background-color: #f0f0f0; 
    border: 1px solid #ddd; text-align: center; margin-top: 10px; 
    margin-bottom: 20px; font-size: 0.9em; padding: 10px 15px; border-radius: 8px; 
}
.chart-gauge-wrapper { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 30px; 
    align-items: flex-start;
    justify-content: center; 
    margin-top: 20px; 
    min-height: 200px; 
}
.gauge-container { 
    width: 300px; 
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.gauge-wrapper {
  position: relative;
  height: 150px;
  width: 300px;
}
.gauge {
    width: 300px; height: 150px; position: relative;
    overflow: hidden; margin: 0 auto;
}
.gauge-arc {
    width: 300px; height: 300px; border-radius: 50%;
    position: absolute; top: 0; left: 0;
    background: conic-gradient(
        from -90deg,
        #a02531 0deg 36deg, #dc3545 36deg 72deg, #ffc107 72deg 108deg,
        #28a745 108deg 144deg, #1a6e30 144deg 180deg
    );
}
.gauge-arc::before {
    content: ''; position: absolute; top: 15%; left: 15%; right: 15%;
    bottom: 15%; background: #ffffff; border-radius: 50%; z-index: 1;
}
.gauge-needle {
    width: 4px; height: 120px; background-color: #333; border-radius: 2px;
    position: absolute; bottom: 0; left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}
.gauge-center-cap {
  position: absolute; width: 20px; height: 20px; background: #333;
  border-radius: 50%; bottom: -10px; left: 50%;
  transform: translateX(-50%); z-index: 3;
}
.gauge-text-area {
  padding-top: 10px;
  text-align: center;
}
.gauge-number { 
    font-size: 3em; font-weight: bold; line-height: 1; 
    display: block; margin-bottom: 5px; margin-right: 0;
}
.gauge-label { 
    font-size: 1.3em; font-weight: 500;
    color: #555; display: block;
}
.gauge-last-updated { /* NEW STYLE for the timestamp */
    font-size: 0.8em;
    color: #888;
    margin-top: 8px;
    font-style: italic;
}
.line-chart-container { 
    flex-grow: 1; min-width: 300px; width: 100%; 
    position: relative; height: 400px;
}
#timePeriodSelector { 
    text-align: right; margin-bottom: 10px; 
}
#timePeriodSelector button { 
    padding: 5px 10px; margin-left: 5px; cursor: pointer; border: 1px solid #ccc; 
    background-color: #eee; border-radius: 4px; font-size: 0.9em; 
}
#timePeriodSelector button.active { 
    background-color: #0056b3; color: white; border-color: #00408a; font-weight: bold; 
}
#timePeriodSelector button:hover:not(.active) { background-color: #ddd; }
canvas { display: block; max-width: 100%; box-sizing: border-box; }

.fear { color: #dc3545; font-weight: bold;} 
.extreme-fear { color: #a02531; font-weight: bold;}
.neutral { color: #ffc107; font-weight: bold;} 
.greed { color: #28a745; font-weight: bold;}
.extreme-greed { color: #1a6e30; font-weight: bold;}

#loadingMessage { 
    text-align: center; padding: 30px 20px; font-style: italic; 
    color: #555; font-size: 1.1em; 
}
.info-section { margin-top: 30px; }
#lineChart { cursor: grab; }
#lineChart:active { cursor: grabbing; }