/**
 * Shared Protocol Page Styles
 * Used by all individual protocol detail pages (heaven, pump, believe, metadao, meteora)
 */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e2e8f0;
    min-height: 100vh;
}

/* Navigation */
nav {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.nav-links a { color: #cbd5e1; text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: color 0.3s ease; padding: 5px 0; }
.nav-links a:hover, .nav-links a.active { color: #60a5fa; }

/* Layout */
.container { max-width: 1400px; margin: 0 auto; padding: 30px 20px 60px; }

.breadcrumb { margin-bottom: 20px; font-size: 0.9rem; }
.breadcrumb a { color: #60a5fa; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #94a3b8; }

/* Tabs */
.tabs { display: flex; gap: 5px; border-bottom: 2px solid rgba(148, 163, 184, 0.1); margin-bottom: 30px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-track { background: rgba(148, 163, 184, 0.1); }
.tabs::-webkit-scrollbar-thumb { background: rgba(96, 165, 250, 0.5); border-radius: 2px; }
.tab { padding: 12px 20px; background: transparent; border: none; color: #94a3b8; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; border-bottom: 3px solid transparent; font-family: inherit; white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.tab:hover { color: #cbd5e1; }
.tab.active { color: #60a5fa; border-bottom-color: #60a5fa; }

/* Page Header */
.page-header { margin-bottom: 25px; }
.page-header h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; color: #fff; margin-bottom: 10px; }
.page-header p { font-size: clamp(0.85rem, 2vw, 1.1rem); color: #94a3b8; line-height: 1.5; }

/* Warning Box */
.warning-box { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); border-left: 4px solid #ef4444; border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; display: flex; align-items: flex-start; gap: 12px; }
.warning-icon-large { font-size: 1.5rem; flex-shrink: 0; }
.warning-box p { color: #fca5a5; font-size: 0.95rem; line-height: 1.5; }

/* Methodology Info */
.methodology-info { background: rgba(96, 165, 250, 0.1); border-left: 3px solid #60a5fa; padding: 12px 16px; margin-bottom: 24px; }
.methodology-info-title { font-weight: 600; color: #60a5fa; font-size: 0.9rem; margin-bottom: 6px; }
.methodology-info-list { list-style: none; padding: 0; margin: 0; }
.methodology-info-list li { color: #cbd5e1; font-size: 0.85rem; line-height: 1.5; margin-bottom: 4px; padding-left: 12px; position: relative; }
.methodology-info-list li:before { content: '•'; position: absolute; left: 0; color: #60a5fa; }

/* Stats Overview */
.stats-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-box { background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%); border: 1px solid rgba(96, 165, 250, 0.3); border-radius: 16px; padding: 20px; text-align: center; }
.stat-label { font-size: 0.85rem; color: #94a3b8; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 8px; }
.stat-change { font-size: 0.9rem; font-weight: 600; color: #94a3b8; }

/* Tables */
.protocol-table-wrapper { background: rgba(30, 41, 59, 0.5); backdrop-filter: blur(10px); border: 1px solid rgba(148, 163, 184, 0.1); border-radius: 20px; padding: 20px; overflow-x: auto; margin-bottom: 30px; }
.protocol-table-wrapper h3 { color: #60a5fa; margin-bottom: 20px; font-size: 1.3rem; }

table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 700px; }
th { text-align: left; padding: 15px 12px; color: #94a3b8; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid rgba(148, 163, 184, 0.2); white-space: nowrap; }
th:nth-child(n+2) { text-align: right; }
tbody tr { border-bottom: 1px solid rgba(148, 163, 184, 0.1); }
td { padding: 15px 12px; color: #e2e8f0; font-size: 0.9rem; }
td:nth-child(n+2) { text-align: right; font-weight: 500; }
.pe-value { color: #60a5fa; font-weight: 700; font-size: 1rem; }
.pe-fdv-value { color: #34d399; font-weight: 700; }

/* Back Link */
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #60a5fa; text-decoration: none; font-weight: 500; margin-bottom: 20px; transition: color 0.2s; }
.back-link:hover { color: #93c5fd; }

/* Revenue Chart Section */
.revenue-chart-section {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
}

.revenue-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.revenue-chart-title {
    color: #60a5fa;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.revenue-chart-legend {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.revenue { background: #60a5fa; }
.legend-dot.burn { background: #f97316; }

.revenue-chart-container {
    position: relative;
    height: 280px;
    margin-bottom: 20px;
    display: flex;
}

.revenue-y-axis {
    width: 50px;
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 8px;
    text-align: right;
    font-size: 0.7rem;
    color: #64748b;
}

.revenue-bars-container {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 220px;
    padding: 0 5px;
    border-left: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
}

.revenue-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(148, 163, 184, 0.1);
    pointer-events: none;
}

.revenue-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    position: relative;
}

.revenue-bar {
    width: 100%;
    max-width: 28px;
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    border-radius: 3px 3px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.revenue-bar-value {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #94a3b8;
    white-space: nowrap;
    margin-bottom: 2px;
    font-weight: 600;
}

.revenue-bar-group:nth-child(even) .revenue-bar-value {
    margin-bottom: 12px;
}

.revenue-bar:hover {
    filter: brightness(1.3);
    transform: scaleY(1.02);
}

.revenue-bar-label {
    font-size: 0.6rem;
    color: #64748b;
    margin-top: 5px;
    text-align: center;
}

.revenue-bar-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #60a5fa;
    border-radius: 8px;
    padding: 10px 14px;
    white-space: nowrap;
    z-index: 100;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.revenue-bar:hover .revenue-bar-tooltip {
    display: block;
}

.revenue-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.revenue-summary-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.revenue-summary-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.revenue-summary-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #60a5fa;
}

.revenue-summary-value.green { color: #10b981; }
.revenue-summary-value.purple { color: #a78bfa; }
.revenue-summary-value.yellow { color: #fbbf24; }
.revenue-summary-value.orange { color: #f97316; }

.revenue-summary-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 3px;
}

.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }

/* Responsive */
@media (max-width: 768px) {
    .nav-container { height: auto; padding: 15px; }
    .nav-links { width: 100%; justify-content: center; margin-top: 10px; gap: 8px; flex-wrap: wrap; }
    .nav-links li { list-style: none; }
    .nav-links a { font-size: 0.8rem; padding: 6px 10px; }
    .logo { font-size: 1.1rem; }
    .container { padding: 20px 12px 40px; }
    .breadcrumb { font-size: 0.8rem; margin-bottom: 15px; }
    .tab { padding: 10px 12px; font-size: 0.8rem; }
    .tabs { gap: 3px; margin-bottom: 20px; padding-bottom: 5px; }
    .page-header { margin-bottom: 20px; }
    .page-header h1 { font-size: 1.8rem; }
    .page-header p { font-size: 0.85rem; }
    .stats-overview { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-box { padding: 15px 12px; border-radius: 12px; }
    .stat-label { font-size: 0.7rem; margin-bottom: 6px; }
    .stat-value { font-size: 1.4rem; margin-bottom: 4px; }
    .stat-change { font-size: 0.75rem; }
    .protocol-table-wrapper { padding: 12px; border-radius: 14px; margin-bottom: 20px; }
    .protocol-table-wrapper h3 { font-size: 1.1rem; margin-bottom: 15px; }
    table { min-width: 550px; }
    th { padding: 10px 6px; font-size: 0.65rem; }
    td { padding: 10px 6px; font-size: 0.75rem; }
    .back-link { font-size: 0.85rem; margin-bottom: 15px; }
    .warning-box { padding: 12px 15px; gap: 10px; border-radius: 10px; }
    .warning-icon-large { font-size: 1.2rem; }
    .warning-box p { font-size: 0.85rem; }
    .methodology-info { padding: 10px 12px; margin-bottom: 20px; }
    .methodology-info-title { font-size: 0.8rem; }
    .methodology-info-list li { font-size: 0.75rem; }

    /* Revenue Chart Mobile */
    .revenue-chart-section { padding: 15px; border-radius: 16px; margin-bottom: 20px; }
    .revenue-chart-header { margin-bottom: 15px; gap: 10px; }
    .revenue-chart-title { font-size: 1.1rem; }
    .revenue-chart-legend { font-size: 0.7rem; gap: 12px; }
    .legend-dot { width: 8px; height: 8px; }
    .revenue-chart-container { height: 220px; margin-bottom: 15px; }
    .revenue-y-axis { width: 40px; font-size: 0.6rem; }
    .revenue-bars-container { gap: 1px; padding: 0 2px; }
    .revenue-bar { max-width: 20px; }
    .revenue-bar-value { font-size: 0.45rem; }
    .revenue-bar-label { font-size: 0.5rem; margin-top: 3px; }
    .revenue-bar-tooltip { font-size: 0.7rem; padding: 8px 10px; }
    .revenue-summary-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    .revenue-summary-card { padding: 12px 10px; border-radius: 10px; }
    .revenue-summary-label { font-size: 0.6rem; margin-bottom: 4px; }
    .revenue-summary-value { font-size: 1.1rem; }
    .revenue-summary-sub { font-size: 0.65rem; }
}

@media (max-width: 480px) {
    .nav-links { gap: 5px; }
    .nav-links a { font-size: 0.7rem; padding: 5px 8px; }
    .container { padding: 15px 10px 30px; }
    .tab { padding: 8px 10px; font-size: 0.75rem; }
    .page-header h1 { font-size: 1.5rem; }
    .page-header p { font-size: 0.8rem; }
    .stats-overview { gap: 8px; }
    .stat-box { padding: 12px 10px; }
    .stat-label { font-size: 0.65rem; }
    .stat-value { font-size: 1.2rem; }
    .stat-change { font-size: 0.7rem; }
    .protocol-table-wrapper { padding: 10px; }
    .protocol-table-wrapper h3 { font-size: 1rem; }
    table { min-width: 480px; }
    th { padding: 8px 4px; font-size: 0.6rem; }
    td { padding: 8px 4px; font-size: 0.7rem; }
    .pe-value { font-size: 0.8rem; }

    /* Revenue Chart Extra Small */
    .revenue-chart-section { padding: 12px; }
    .revenue-chart-title { font-size: 1rem; }
    .revenue-chart-container { height: 180px; }
    .revenue-y-axis { width: 35px; font-size: 0.55rem; }
    .revenue-bar { max-width: 16px; }
    .revenue-bar-value { font-size: 0.4rem; }
    .revenue-bar-label { font-size: 0.45rem; }
    .revenue-summary-value { font-size: 1rem; }
    .revenue-summary-label { font-size: 0.55rem; }
    .revenue-summary-sub { font-size: 0.6rem; }
}

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