/* Silver Strategy - Dashboard Styles */

:root {
    /* Silver Color Palette */
    --silver: #C0C0C0;
    --silver-light: #E8E8E8;
    --silver-dark: #8B8B8B;

    /* UI Colors */
    --bg-main: #FAFAFA;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;

    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;

    /* Status Colors */
    --green: #10B981;
    --green-light: #D1FAE5;
    --red: #EF4444;
    --yellow: #F59E0B;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-top {
    padding: 20px 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 24px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--silver-light);
    color: var(--text-primary);
}

.nav-item.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Sidebar Bottom */
.sidebar-bottom {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.sidebar-link:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.sidebar-link svg {
    width: 16px;
    height: 16px;
}

.link-icon-circle {
    width: 16px;
    height: 16px;
    background: var(--silver);
    border-radius: 50%;
}

/* Connect Wallet */
.connect-wallet {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-main);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.connect-wallet:hover {
    background: var(--silver-light);
}

.wallet-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.wallet-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.wallet-info {
    display: flex;
    flex-direction: column;
}

.wallet-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.wallet-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 0 24px 24px;
}

/* Top Bar */
.top-bar {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    position: sticky;
    top: 0;
    background: var(--bg-main);
    z-index: 50;
}

.top-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 6px;
}

.top-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
}

.top-stat-change {
    font-size: 13px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.top-stat.positive .top-stat-change {
    color: var(--green);
    background: var(--green-light);
}

.top-stat.negative .top-stat-change {
    color: var(--red);
    background: #FEE2E2;
}

/* Strategy Section */
.strategy-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.strategy-content {
    max-width: 600px;
}

.strategy-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--silver-dark);
    margin-bottom: 8px;
}

.sparkle-icon {
    width: 14px;
    height: 14px;
    color: var(--silver);
}

/* Live Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--green);
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

.strategy-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.strategy-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Strategy Actions */
.strategy-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--silver-light);
    border-color: var(--silver);
}

.action-btn svg {
    width: 16px;
    height: 16px;
    color: var(--silver-dark);
}

.action-btn.primary {
    background: var(--silver);
    border-color: var(--silver-dark);
    color: white;
}

.action-btn.primary:hover {
    background: var(--silver-dark);
}

.action-btn.primary svg {
    color: white;
}

/* CA Display */
.ca-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ca-display:hover {
    background: var(--silver-light);
    border-color: var(--silver);
}

.ca-display.copied {
    background: var(--green-light);
    border-color: var(--green);
}

.ca-display.copied .ca-label {
    color: var(--green);
}

.ca-label {
    font-weight: 600;
    color: var(--silver-dark);
}

.ca-value {
    font-family: monospace;
    color: var(--text-secondary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Chart Toggle */
.chart-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-main);
    padding: 4px;
    border-radius: 8px;
}

.toggle-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--silver);
    color: white;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, rgba(232, 232, 232, 0.05) 100%);
    border-color: var(--silver);
}

.stat-card-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-main);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-card-icon svg {
    width: 18px;
    height: 18px;
    color: var(--silver-dark);
}

.stat-card.highlight .stat-card-icon {
    background: var(--silver);
}

.stat-card.highlight .stat-card-icon svg {
    color: white;
}

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

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card-value.highlight {
    color: var(--green);
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.mini-chart {
    width: 60px;
    height: 24px;
}

.mini-chart.up {
    color: var(--green);
}

.mini-chart.down {
    color: var(--red);
}

.stat-card.view-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.stat-card.view-link a {
    font-size: 14px;
    font-weight: 600;
    color: var(--silver-dark);
    text-decoration: none;
    margin-bottom: 4px;
}

.stat-card.view-link a:hover {
    text-decoration: underline;
}

/* Chart Section */
.chart-section {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.chart-header {
    padding: 20px 20px 0;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.chart-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.time-filters {
    display: flex;
    gap: 4px;
}

.time-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.time-btn:hover {
    background: var(--bg-main);
}

.time-btn.active {
    background: var(--silver-light);
    color: var(--text-primary);
    border-color: var(--silver);
}

.chart-options {
    display: flex;
    gap: 8px;
}

.option-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.option-btn:hover {
    border-color: var(--silver);
}

.option-btn.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

.chart-area {
    padding: 0;
    position: relative;
}

/* DEXScreener Embed */
#dexscreener-embed {
    position: relative;
    width: 100%;
    padding-bottom: 40%;
}

#dexscreener-embed iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border: 0;
    border-radius: 0 0 12px 12px;
}

/* Analysis Panel */
.analysis-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.analysis-header {
    margin-bottom: 20px;
}

.analysis-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.analysis-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.analysis-highlight {
    text-align: right;
    margin-bottom: 24px;
}

.highlight-badge {
    display: inline-block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.highlight-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
}

.highlight-value.positive {
    color: var(--green);
}

.highlight-value.negative {
    color: var(--red);
}

.analysis-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.analysis-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analysis-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.analysis-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.bullish-signal {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--green-light);
    border-radius: 10px;
    margin-bottom: 20px;
}

.signal-icon {
    width: 32px;
    height: 32px;
    background: var(--green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.signal-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.signal-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.signal-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.analysis-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.analysis-cta:hover {
    background: var(--silver-light);
    border-color: var(--silver);
}

.analysis-cta svg {
    width: 16px;
    height: 16px;
}

/* Reserve Section */
.reserve-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.reserve-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.reserve-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.reserve-table {
    padding: 0;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 100px;
    gap: 16px;
    padding: 12px 20px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.table-header span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-empty {
    padding: 40px 20px;
    text-align: center;
}

.table-empty p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .chart-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .strategy-section {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-stats {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .table-header {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 0 16px 16px;
    }
}
