:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #3b82f6;
    --accent: #8b5cf6;
    /* Violet */
    --bitcoin-orange: #f7931a;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Nav Link Styles */
.nav-links {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.btc-logo {
    color: var(--bitcoin-orange);
    width: 32px;
    height: 32px;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--success);
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
}

.pulse {
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Glass Panel Styling */
.glass-panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-icon {
    color: var(--accent);
    opacity: 0.8;
}

/* Price Card Specifics */
.price-card {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .price-card {
        grid-column: span 2;
    }
}

.price-display {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.main-value {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chart-container {
    position: relative;
    width: 100%;
}

.main-chart {
    height: 300px;
}

.secondary-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.volume-chart-container {
    height: 150px;
    margin-top: 16px;
}

/* Sentiment */
.sentiment-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.gauge-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(var(--danger) 0deg 90deg,
            var(--warning) 90deg 180deg,
            var(--success) 180deg 270deg,
            var(--primary) 270deg 360deg);
    /* Simplified representation, creates a colorful ring */
    /* Real gauge is complex in CSS, we'll mimic with border or gradient */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.gauge-wrapper::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    background: var(--bg-dark);
    border-radius: 50%;
}

.gauge-value {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.gauge-label {
    position: absolute;
    bottom: 35px;
    z-index: 2;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.sentiment-details {
    width: 100%;
    text-align: center;
}

.prediction-box {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.sentiment-sources {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    gap: 6px;
    opacity: 0.8;
}

.sentiment-sources .source-value {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.prediction-box .value {
    font-weight: 600;
    color: var(--accent);
}

/* Analysis */
.events-list {
    min-height: 100px;
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.event-item {
    font-size: 0.9rem;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-item.peak {
    border-left-color: var(--success);
}

.event-item.shrink {
    border-left-color: var(--danger);
}

.volatility-meter {
    margin-top: auto;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    width: 0%;
    transition: width 0.5s ease;
}

/* Polymarket Specifics */
.polymarket-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poly-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.poly-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.poly-odds {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.poly-odds.high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.poly-odds.low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Polymarket Date Headers */
.poly-date-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 12px;
    margin-bottom: 4px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    /* Reset link style */
    cursor: pointer;
    transition: color 0.2s;
}

.poly-date-header:hover {
    color: var(--primary);
}

.poly-date-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.poly-date-header:first-child {
    margin-top: 0;
}

/* Tooltip Chart */
.poly-chart-tooltip {
    position: absolute;
    width: 280px;
    height: 160px;
    background: #0f172a;
    /* Solid dark for visibility */
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 12px;
    z-index: 100;
    pointer-events: none;
    /* Mouse through */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: none;
    /* Hidden by default */
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.poly-chart-tooltip.visible {
    display: block;
    opacity: 1;
}

.poly-item {
    position: relative;
    cursor: crosshair;
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.poly-item:hover {
    background: rgba(255, 255, 255, 0.08);
    /* highlight entire block */
}

/* Alert / Toast System */
#alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
    /* Let clicks pass through if empty */
}

.toast {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    animation: slideIn 0.3s forwards;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast.warning {
    border-left-color: #f59e0b;
    /* Amber */
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.toast.critical {
    border-left-color: #ef4444;
    /* Red */
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    background: rgba(30, 10, 10, 0.95);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-content {
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toast.hiding {
    animation: fadeOut 0.3s forwards;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* Flash Screen Effect for Critical Alerts */
@keyframes flashRed {

    0%,
    100% {
        box-shadow: inset 0 0 0 rgba(255, 0, 0, 0);
    }

    50% {
        box-shadow: inset 0 0 50px rgba(239, 68, 68, 0.3);
    }
}

.alert-mode-critical {
    animation: flashRed 2s infinite;
}

.volatility-dashboard {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vol-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.vol-metric {
    display: flex;
    flex-direction: column;
}

.sub-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vol-prediction-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--text-secondary);
}

.vol-prediction-box.high-vol {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.vol-prediction-box.squeeze {
    border-left-color: var(--accent);
    /* Violet for squeeze */
    background: rgba(139, 92, 246, 0.05);
}

.vol-prediction-box.low-vol {
    border-left-color: var(--success);
}

.chem-icon {
    font-size: 1.5rem;
}

.pred-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: Var(--text-primary);
    margin-bottom: 2px;
}

.pred-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 20px;
}

/* Responsive */
/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: 12px;
        /* Less padding on mobile */
        gap: 16px;
    }

    /* Header Stack */
    .glass-header {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        align-items: center;
    }

    .logo-section {
        margin-bottom: 4px;
    }

    .status-indicator {
        width: 100%;
        justify-content: center;
        background: rgba(16, 185, 129, 0.05);
        /* Lighter bg */
    }

    /* Scrollable Nav for smaller screens */
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Vertical Dashboard */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        /* Force 1 column */
        gap: 16px;
    }

    /* Adjust Cards */
    .glass-panel {
        padding: 16px;
    }

    .main-value {
        font-size: 2.8rem;
    }

    /* Stats Grid: Keep 2 cols but tighter */
    .price-stats-container {
        gap: 8px !important;
    }

    .stat-box {
        padding: 8px !important;
    }
}

@media (max-width: 480px) {
    .main-value {
        font-size: 2.2rem;
    }

    .secondary-value {
        font-size: 1.5rem;
    }

    .card-header h2 {
        font-size: 1rem;
    }
}

/* Chart Controls */
.chart-controls {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.range-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.range-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.range-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Info Point Button Style */
.btn-info-point {
    width: 100%;
    margin-top: 20px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-info-point:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(98, 126, 234, 0.4);
    filter: brightness(1.1);
}

/* Telegram Button Style */
.btn-telegram {
    width: 100%;
    margin-top: 10px;
    /* Reduced spacing */
    background: linear-gradient(90deg, #0088cc, #00bcd4);
    /* Telegram Blue Gradient */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.5);
    filter: brightness(1.1);
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    text-align: center;
    /* Center text */
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    /* Force horizontal centering */
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Home Corner Link */
.home-link-corner {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    z-index: 1001;
    /* Ensure it's above everything */
    backdrop-filter: blur(5px);
}

.home-link-corner:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

/* Make sure header accommodates it */
.card-header {
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 10px;
}

/* Polymarket Portfolio */
.poly-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.poly-input:focus {
    outline: none;
    border-color: var(--primary);
}

.add-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.add-btn:hover {
    filter: brightness(1.1);
}

.side-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
}

.side-btn.active[data-side="YES"] {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.side-btn.active[data-side="NO"] {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.port-item {
    font-size: 0.85rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 6px;
    border-left: 2px solid transparent;
}

.port-item.win {
    border-left-color: var(--success);
}

.port-item.loss {
    border-left-color: var(--danger);
}

.port-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.port-meta {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.remove-btn {
    color: #ef4444;
    cursor: pointer;
    margin-left: 8px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-y: auto;
    color: var(--text-primary);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    line-height: 1.7;
    color: var(--text-secondary);
}

.modal-body h3 {
    color: var(--text-primary);
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.info-img-container {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.info-img-container img {
    width: 100%;
    height: auto;
    display: block;
}

.info-caption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    font-style: italic;
}

/* Hover Preview Logic */
.feature-card {
    position: relative;
    /* Context for absolute positioning */
    z-index: 1;
}

.hover-preview {
    display: none;
    position: absolute;
    bottom: 110%;
    /* Show above the card */
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through if needed */
    animation: fadeInPreview 0.3s ease forwards;
}

.hover-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Arrow for the tooltip */
.hover-preview::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
}

.feature-card:hover {
    z-index: 10;
    /* Bring card to front on hover */
}

.feature-card:hover .hover-preview {
    display: block;
}

@keyframes fadeInPreview {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Dashboard Links - Flexbox for centering */
.dashboard-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    width: 100%;
}

.dashboard-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 32px;
    /* Larger buttons */
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);

    flex: 1 1 200px;
    max-width: 250px;
    /* Prevent them from getting too wide */
}

.btn-btc {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.2), rgba(247, 147, 26, 0.1));
    border-color: rgba(247, 147, 26, 0.3);
}

.btn-eth {
    background: linear-gradient(135deg, rgba(98, 126, 234, 0.2), rgba(98, 126, 234, 0.1));
    border-color: rgba(98, 126, 234, 0.3);
}

.btn-sol {
    background: linear-gradient(135deg, rgba(20, 241, 149, 0.2), rgba(20, 241, 149, 0.1));
    border-color: rgba(20, 241, 149, 0.3);
}

.btn-xrp {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-portfolio {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(236, 72, 153, 0.1));
    border-color: rgba(236, 72, 153, 0.3);
    max-width: fit-content;
    white-space: nowrap;
    padding: 20px 40px;
}

.btn-guide {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
    max-width: 300px;
    flex: 1.2;
    padding: 20px 20px;
}

/* --- Volatility Grid Layout --- */
.volatility-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    /* Narrower sidebar | Main content takes rest */
    gap: 30px;
    /* Increased gap for visual separation */
    align-items: start;
    margin-top: 10px;
}

.volatility-insights-panel {
    background: rgba(255, 255, 255, 0.02);
    /* More subtle background */
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Fainter border */
    padding: 20px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.insight-block {
    margin-bottom: 25px;
}

.insight-block:last-child {
    margin-bottom: 0;
}

.insight-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.insight-highlight {
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 900px) {
    .volatility-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile/tablet */
    }

    .volatility-insights-panel {
        order: 2;
        /* Put text below chart on mobile if desired, or remove to keep above */
        order: 0;
        /* Keeping it above for educational value */
    }
}


.dashboard-btn:hover {
    transform: scale(1.03);
    filter: brightness(1.2);
}