.cat-page {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.dash-card.highlight-green {
    border-color: #2ecc71;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(0,0,0,0.4));
}

.dash-card.highlight-gold {
    border-color: #f1c40f;
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.1), rgba(0,0,0,0.4));
}

.dash-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-green h3 { color: #2ecc71; }
.highlight-gold h3 { color: #f1c40f; }

.dash-content {
    display: flex;
    align-items: center;
}

.dash-details strong {
    font-size: 1.1rem;
    color: var(--text-bright);
    display: block;
    margin-bottom: 5px;
}

.dash-details p {
    margin: 2px 0;
    color: var(--text);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 5px;
}

.badge.green { background: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid #2ecc71; }
.badge.red { background: rgba(231, 76, 60, 0.2); color: #e74c3c; border: 1px solid #e74c3c; }

/* Recommendation Box */
.recommendation-box {
    background: rgba(var(--accent-rgb), 0.1);
    border-left: 4px solid var(--accent);
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 30px;
    color: var(--text-bright);
}

/* Controls Bar */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: var(--bg-card);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

@media (max-width: 600px) {
    .controls-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border: 1px solid var(--border);
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
}
input:checked + .slider { background-color: var(--accent); border-color: var(--accent); }
input:checked + .slider:before { transform: translateX(20px); background-color: #fff; }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }

/* Catalysts Grid */
.catalysts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.cat-card.winner {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3);
}

.cat-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.cat-header img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.cat-title h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.cat-title p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-bright);
    display: flex;
    justify-content: space-between;
}

.input-group label i {
    cursor: help;
    color: var(--text-muted);
}

.input-group input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    width: 100%;
}
.input-group input:focus {
    border-color: var(--accent);
    outline: none;
}
.input-group input.invalid {
    border-color: #e74c3c;
}

/* Averages Section */
.avg-section {
    background: rgba(0,0,0,0.15);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none; /* hidden by default */
}
.avg-section.visible {
    display: block;
}
.avg-section h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.avg-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.status-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.75rem;
}
.status-indicator.cheap { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.status-indicator.normal { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.status-indicator.expensive { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }

/* Liquidity Section */
.liquidity-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
}

.liquidity-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
    display: flex;
}
.liquidity-fill-buy { background: #3498db; }
.liquidity-fill-sell { background: #e67e22; }

.liquidity-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Results section inside card */
.cat-results {
    margin-top: 15px;
    padding: 15px;
    background: rgba(var(--accent-rgb), 0.05);
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.res-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.res-row:last-child { margin-bottom: 0; }
.res-val { font-weight: 600; color: var(--text-bright); }

/* Goal Section */
.goal-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
}

.goal-section h2 {
    color: var(--accent);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.goal-input-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.goal-input-container input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    width: 200px;
}
.goal-input-container input:focus { border-color: var(--accent); outline: none;}

.table-responsive {
    overflow-x: auto;
}

.goal-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.goal-table th, .goal-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.goal-table th {
    background: rgba(0,0,0,0.2);
    font-weight: 600;
    color: var(--text-bright);
}

.goal-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.goal-table .winner-row {
    background: rgba(46, 204, 113, 0.05);
    border-left: 3px solid #2ecc71;
}

.goal-table .winner-row td:first-child {
    color: #2ecc71;
    font-weight: bold;
}

/* Tooltip (basic) */
[title] {
    cursor: help;
}

/* Reset Button styling to match the theme */
#btn-reset {
    background: rgba(251, 175, 64, 0.1); /* Accent color with opacity */
    border: 1px solid rgba(251, 175, 64, 0.3);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

#btn-reset:hover {
    background: rgba(251, 175, 64, 0.2);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(251, 175, 64, 0.15);
}

.light-mode #btn-reset {
    background: rgba(251, 175, 64, 0.15);
    color: #d98a1a;
    border-color: rgba(251, 175, 64, 0.4);
}

.light-mode #btn-reset:hover {
    background: rgba(251, 175, 64, 0.25);
    border-color: #d98a1a;
}
