:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --border-color: #30363d;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.row {
    display: grid;
    grid-template-columns: 300px 1fr 1fr;
    gap: 20px;
}

.grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    grid-column: span 3;
}

@media (max-width: 1024px) {
    .row {
        grid-template-columns: 1fr;
    }
    .grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-6 {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 400px; /* Increased height for better chart visibility */
}

.card:hover {
    border-color: var(--accent-color);
}

.sentiment-card {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Custom Gauge Styling */
.gauge-container {
    width: 100%;
    max-width: 250px;
    margin: 10px auto;
    position: relative;
}

.gauge {
    width: 100%;
    height: 0;
    padding-bottom: 50%;
    background: transparent;
    position: relative;
    border-radius: 125px 125px 0 0;
    overflow: hidden;
}

.gauge-body {
    width: 100%;
    height: 100%;
    background: #30363d;
    position: relative;
}

.gauge-fill {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #ff4d4d, #ffcc00, #4dff4d);
    transform-origin: center top;
    transform: rotate(0.5turn);
    transition: transform 0.5s ease;
}

.gauge-cover {
    width: 75%;
    height: 150%;
    background: var(--card-bg);
    border-radius: 50%;
    position: absolute;
    top: 25%;
    left: 12.5%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-needle {
    width: 2px;
    height: 100%;
    background: #ffffff;
    position: absolute;
    top: 0;
    left: calc(50% - 1px);
    transform-origin: bottom center;
    transform: rotate(-90deg);
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

.gauge-needle::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #ffffff;
    position: absolute;
    bottom: -5px;
    left: -4px;
    border-radius: 50%;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-secondary);
}

#fng-value {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.fng-status {
    font-weight: bold;
    font-size: 1rem;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-card h3 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tv-widget {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 250px;
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.symbol-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1rem;
    width: 80px;
    padding: 2px;
}

.symbol-input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
}

iframe {
    background: transparent;
}
