/*
 * ELEKTRON ANALYTICS - Home Page Styles
 * Consolidated CSS for the landing page
 */

/* ═══════════════════════════════════════════════════════════════
   VIDEO BACKGROUND
   ═══════════════════════════════════════════════════════════════ */

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: contain;
    opacity: 0.15;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(10, 10, 10, 0.4) 0%, 
        rgba(10, 10, 10, 0.6) 50%,
        rgba(10, 10, 10, 0.9) 100%);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN LAYOUT CONTAINER
   ═══════════════════════════════════════════════════════════════ */

.landing-layout {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem 2rem 2rem;
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   HERO HEADER
   ═══════════════════════════════════════════════════════════════ */

.hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-logo {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 15px rgba(255, 153, 0, 0.3));
}

.hero-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--fg-primary);
    margin: 0;
}

.hero-subtitle {
    font-size: 0.8rem;
    color: var(--fg-dim);
    margin: 0 0 0 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .hero-subtitle {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   NODE STATUS INDICATOR
   ═══════════════════════════════════════════════════════════════ */

.node-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-family: 'IBM Plex Mono', monospace;
    transition: all 0.2s ease;
    text-decoration: none;
}

.node-status:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.node-status-icon {
    font-size: 0.85rem;
}

.node-status-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg-dim);
}

.node-status-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg-primary);
}

.node-status-count.all-online {
    color: #00c853;
}

.node-status-count.some-offline {
    color: var(--accent);
}

.node-status-count.all-offline {
    color: #ff5252;
}

.node-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fg-dim);
}

.node-dot.online {
    background: #00c853;
    box-shadow: 0 0 6px rgba(0, 200, 83, 0.5);
}

.node-dot.partial {
    background: var(--accent);
    box-shadow: 0 0 6px rgba(247, 147, 26, 0.5);
}

.node-dot.offline {
    background: #ff5252;
    box-shadow: 0 0 6px rgba(255, 82, 82, 0.5);
}

.node-dot.checking {
    background: var(--fg-dim);
    animation: pulse 1.5s ease-in-out infinite;
}

@media (max-width: 600px) {
    .node-status {
        padding: 0.4rem 0.6rem;
    }
    .node-status-text {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   HALVING COUNTDOWN WIDGET
   ═══════════════════════════════════════════════════════════════ */

.halving-countdown {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.08) 0%, rgba(247, 147, 26, 0.02) 100%);
    border: 1px solid rgba(247, 147, 26, 0.15);
    border-radius: 8px;
    font-family: 'IBM Plex Mono', monospace;
    position: relative;
    overflow: hidden;
}

.halving-countdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(247, 147, 26, 0.4), transparent);
}

.halving-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.2) 0%, rgba(247, 147, 26, 0.1) 100%);
    border-radius: 6px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.halving-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.halving-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-dim);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.halving-era {
    color: var(--accent);
    font-weight: 600;
}

.halving-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.halving-days {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--fg-primary);
    line-height: 1;
}

.halving-days-unit {
    font-size: 0.85rem;
    color: var(--fg-dim);
    font-weight: 400;
}

.halving-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.25rem;
}

.halving-stats {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.halving-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.halving-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg-dim);
    opacity: 0.7;
}

.halving-stat-value {
    font-size: 0.8rem;
    color: var(--fg-muted);
    font-weight: 500;
}

.halving-date {
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.8;
}

/* Halving progress ring */
.halving-progress {
    position: relative;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.halving-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.halving-progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 3;
}

.halving-progress-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.halving-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
}

@media (max-width: 900px) {
    .halving-divider,
    .halving-stats {
        display: none;
    }
}

@media (max-width: 600px) {
    .halving-countdown {
        padding: 0.5rem 0.75rem;
        gap: 0.6rem;
    }
    .halving-icon {
        display: none;
    }
    .halving-days {
        font-size: 0.95rem;
    }
    .halving-progress {
        width: 28px;
        height: 28px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   QUOTE SECTION
   ═══════════════════════════════════════════════════════════════ */

.quote-section {
    padding: 1.5rem 0 1.5rem 3rem;
    position: relative;
    max-width: 750px;
    margin-bottom: 1rem; /* Reduced - cypherpunk banner handles bottom spacing */
}

.quote-section::before {
    content: '"';
    position: absolute;
    left: 0;
    top: 0.75rem;
    font-family: Georgia, serif;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.3;
    line-height: 1;
}

.quote-container {
    position: relative;
}

.quote-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--fg-muted);
    margin: 0 0 0.5rem;
    opacity: 0;
    transition: opacity 0.5s ease, max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Limit to 4 lines with ellipsis for very long quotes */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 6.8em; /* 4 lines × 1.7 line-height */
}

.quote-text.visible {
    opacity: 1;
}

.quote-text.expanded {
    -webkit-line-clamp: unset;
    max-height: 50em; /* Large enough for any quote */
    overflow: visible;
}

/* Expand/Collapse Button */
.quote-expand-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    padding: 0.35rem 0;
    margin-bottom: 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--fg-dim);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.quote-expand-btn:hover {
    color: var(--accent);
}

.quote-expand-btn .expand-icon {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.quote-expand-btn.expanded .expand-icon {
    transform: rotate(180deg);
}

.quote-expand-btn .expand-text {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.quote-expand-btn:hover .expand-text {
    opacity: 1;
}

.quote-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quote-author {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.quote-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--fg-dim);
}

.quote-categories {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.quote-category {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    background: rgba(247, 147, 26, 0.08);
    border: 1px solid rgba(247, 147, 26, 0.15);
    color: var(--accent);
    border-radius: 2px;
}

.quote-source {
    margin-top: 0.75rem;
}

.quote-source a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    color: var(--fg-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.4;
    transition: all 0.2s ease;
}

.quote-source a:hover {
    opacity: 1;
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   OPEN SOURCE NOTICE
   ═══════════════════════════════════════════════════════════════ */

.opensource-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    margin-bottom: 200px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

.opensource-text {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.opensource-divider {
    color: var(--fg-dim);
    opacity: 0.3;
}

.opensource-quote {
    color: var(--fg-dim);
    font-style: italic;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════
   STATS DASHBOARD - FIXED BOTTOM
   ═══════════════════════════════════════════════════════════════ */

.stats-dashboard {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 2rem 1.5rem;
    z-index: 10;
}

.stats-container {
    max-width: 1300px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1000px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .stats-dashboard {
        position: relative;
        padding: 2rem 0 0;
    }
    .landing-layout {
        min-height: auto;
        padding-bottom: 1rem;
    }
    .quote-section {
        margin-bottom: 1rem; /* No need for extra margin when not fixed */
    }
    .opensource-notice {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .opensource-notice {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

.stat-card {
    background: rgba(12, 12, 12, 0.9);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: background 0.2s ease;
}

.stat-card:hover {
    background: rgba(20, 20, 20, 0.95);
}

.stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-dim);
}

.stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--fg-primary);
    line-height: 1.1;
}

.stat-value .unit {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--fg-muted);
    margin-left: 0.25rem;
}

.stat-value .currency {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--fg-muted);
    margin-right: 0.1rem;
}

.stat-subtext {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--fg-dim);
    min-height: 0.9rem;
}

.stat-subtext.live {
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

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

@keyframes pulse-home {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(255, 153, 0, 0); }
}

/* ═══════════════════════════════════════════════════════════════
   BLOCK TIME STATUS
   ═══════════════════════════════════════════════════════════════ */

.block-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.12rem 0.45rem;
    border-radius: 3px;
    font-size: 0.55rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.block-status.fast {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.block-status.slow {
    background: rgba(255, 82, 82, 0.15);
    color: #ff5252;
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.block-status.normal {
    background: rgba(255, 255, 255, 0.06);
    color: var(--fg-muted);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ═══════════════════════════════════════════════════════════════
   EPOCH CARD WITH PROGRESS BAR
   ═══════════════════════════════════════════════════════════════ */

.epoch-card {
    min-width: 180px;
}

.epoch-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.epoch-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.epoch-progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.epoch-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.epoch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #f7931a 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 6px rgba(247, 147, 26, 0.3);
}

.epoch-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    color: var(--fg-dim);
    font-family: 'IBM Plex Mono', monospace;
}

#epoch-eta {
    color: var(--fg-muted);
}

/* ═══════════════════════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════════════════════ */

.stat-value.loading {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent;
    min-width: 80px;
    height: 1.9rem;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════════
   GENERAL ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
