/* addrproxy.com - Dark Glassmorphism / Layered Depth */
/* Palette: #0a0a0f, #1a1a2e, #7b68ee, #00d4aa, #ff4757, #e0e0e8, #5a5a7a */

:root {
    --void: #0a0a0f;
    --panel: #1a1a2e;
    --glow: #7b68ee;
    --teal: #00d4aa;
    --alert: #ff4757;
    --text: #e0e0e8;
    --dim: #5a5a7a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ================================ */
/* Scanline Overlay                 */
/* ================================ */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.04) 2px,
        rgba(0, 0, 0, 0.04) 4px
    );
    pointer-events: none;
    z-index: 1000;
}

/* ================================ */
/* Connection Status (top right)    */
/* ================================ */
.connection-status {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 500;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    animation: pulse 2s ease-in-out infinite;
}

.status-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--teal);
}

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

/* ================================ */
/* Margin Metadata                  */
/* ================================ */
.margin-meta {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 400;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.margin-meta:hover {
    opacity: 0.8;
}

.margin-left {
    left: 16px;
}

.margin-right {
    right: 16px;
    text-align: right;
}

.meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    color: var(--dim);
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.meta-label:first-child {
    margin-top: 0;
}

.meta-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--glow);
}

/* ================================ */
/* Proxy Layers (Sections)          */
/* ================================ */
.proxy-layer {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    gap: 2.5rem;
}

/* ================================ */
/* Surface Layer: Hero              */
/* ================================ */
#surface {
    min-height: 100vh;
    padding-bottom: 4rem;
}

.layer-depth-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(123, 104, 238, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 80% 60% at 30% 70%, rgba(0, 212, 170, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.cascade-stack {
    position: relative;
    width: 440px;
    height: 300px;
    max-width: 90vw;
}

.cascade-panel {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(123, 104, 238, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.panel-back {
    top: 0;
    left: 0;
    opacity: 0.25;
}

.panel-mid {
    top: 22px;
    left: 22px;
    opacity: 0.45;
}

.panel-front {
    top: 44px;
    left: 44px;
    opacity: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: rgba(26, 26, 46, 0.7);
    border-color: rgba(123, 104, 238, 0.35);
}

.panel-data-noise {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 1rem;
    overflow: hidden;
}

.panel-data-noise span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--dim);
    opacity: 0.3;
    white-space: nowrap;
    word-spacing: 1rem;
    line-height: 2;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    color: var(--text);
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--dim);
    margin-top: 0.75rem;
    text-align: center;
}

.brand-underline {
    width: 40px;
    height: 2px;
    background: var(--glow);
    margin-top: 1.2rem;
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(123, 104, 238, 0.5);
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease-in-out infinite;
    color: var(--dim);
    opacity: 0.5;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ================================ */
/* Data Streams                     */
/* ================================ */
.data-stream {
    overflow: hidden;
    padding: 0.6rem 0;
    border-top: 1px solid rgba(123, 104, 238, 0.1);
    border-bottom: 1px solid rgba(123, 104, 238, 0.1);
    position: relative;
}

.stream-track {
    display: flex;
    width: max-content;
}

.stream-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--dim);
    opacity: 0.35;
    white-space: nowrap;
    display: inline-block;
    animation: streamScroll 30s linear infinite;
    letter-spacing: 0.05em;
}

.stream-reverse .stream-text {
    animation: streamScrollReverse 25s linear infinite;
}

@keyframes streamScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes streamScrollReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ================================ */
/* Stacking Panels (Glass)          */
/* ================================ */
.stacking-panel {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(123, 104, 238, 0.25);
    border-radius: 10px;
    padding: 2rem 2.2rem;
    max-width: 640px;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.4s ease;
}

.stacking-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.stacking-panel:hover {
    border-color: rgba(123, 104, 238, 0.5);
}

.teal-glow {
    border-color: rgba(0, 212, 170, 0.25);
}

.teal-glow:hover {
    border-color: rgba(0, 212, 170, 0.5);
}

.teal-glow .section-title {
    color: var(--teal);
}

/* ================================ */
/* Panel Headers                    */
/* ================================ */
.panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.shield-icon {
    animation: glowPulse 3s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(123, 104, 238, 0.3)); }
    50% { filter: drop-shadow(0 0 14px rgba(123, 104, 238, 0.7)); }
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.section-body {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--dim);
}

/* ================================ */
/* Panel Footer / Stats             */
/* ================================ */
.panel-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(123, 104, 238, 0.1);
}

.footer-stat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--dim);
}

.stat-value {
    color: var(--glow);
    font-weight: 700;
}

.stat-highlight {
    color: var(--teal);
}

/* Panel Badge */
.panel-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    border: 1px solid rgba(123, 104, 238, 0.4);
    color: var(--glow);
    margin-left: auto;
}

.badge-teal {
    border-color: rgba(0, 212, 170, 0.4);
    color: var(--teal);
}

/* ================================ */
/* Route Visualization              */
/* ================================ */
.route-viz {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.route-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.node-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--dim);
    background: transparent;
}

.node-dot-active {
    border-color: var(--glow);
    background: rgba(123, 104, 238, 0.3);
    box-shadow: 0 0 8px rgba(123, 104, 238, 0.4);
}

.node-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.route-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, var(--dim), var(--glow), var(--dim));
    opacity: 0.4;
    margin: 0 0.3rem;
    margin-bottom: 1.2rem;
}

/* ================================ */
/* Encryption Visualization         */
/* ================================ */
.encryption-viz {
    margin-top: 1.5rem;
}

.encrypt-layer {
    border: 1px solid rgba(123, 104, 238, 0.2);
    border-radius: 6px;
    padding: 0.8rem;
    position: relative;
}

.encrypt-layer-1 {
    border-color: rgba(123, 104, 238, 0.15);
    background: rgba(123, 104, 238, 0.03);
}

.encrypt-layer-2 {
    border-color: rgba(123, 104, 238, 0.25);
    background: rgba(123, 104, 238, 0.05);
    margin-top: 0.5rem;
}

.encrypt-layer-3 {
    border-color: rgba(0, 212, 170, 0.3);
    background: rgba(0, 212, 170, 0.05);
    margin-top: 0.5rem;
    text-align: center;
    padding: 0.6rem;
}

.encrypt-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--dim);
    letter-spacing: 0.05em;
}

.encrypt-layer-3 .encrypt-label {
    color: var(--teal);
}

/* ================================ */
/* Filter Layer                     */
/* ================================ */
.filter-layer {
    background: rgba(0, 0, 0, 0.3);
}

/* Rule List */
.rule-list {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(123, 104, 238, 0.06);
}

.rule-item:last-child {
    border-bottom: none;
}

.rule-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    flex-shrink: 0;
}

.rule-pass {
    color: var(--teal);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.rule-deny {
    color: var(--alert);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.rule-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: var(--dim);
}

/* Privacy Stats */
.privacy-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 212, 170, 0.1);
}

.privacy-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.privacy-stat-num {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--teal);
}

.privacy-stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================ */
/* Redaction Effect                 */
/* ================================ */
.redact {
    background: var(--glow);
    color: transparent;
    border-radius: 2px;
    padding: 0 4px;
    transition: background 0.6s ease, color 0.6s ease;
    cursor: default;
}

.redact.revealed {
    background: transparent;
    color: var(--teal);
}

/* ================================ */
/* Terminal Layer                    */
/* ================================ */
.terminal-layer {
    background: var(--void);
    min-height: 80vh;
    justify-content: center;
    gap: 3rem;
}

.terminal-container {
    max-width: 640px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(123, 104, 238, 0.2);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.terminal-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.terminal-chrome {
    background: rgba(26, 26, 46, 0.8);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(123, 104, 238, 0.1);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

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

.tdot-red { background: var(--alert); opacity: 0.7; }
.tdot-yellow { background: #f1c40f; opacity: 0.7; }
.tdot-green { background: var(--teal); opacity: 0.7; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--dim);
    margin-left: auto;
}

.terminal-body {
    background: rgba(10, 10, 15, 0.95);
    padding: 1.5rem;
}

.terminal-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 2;
    color: var(--text);
}

.dim-line {
    color: var(--dim);
    font-size: 0.72rem;
}

.prompt {
    color: var(--glow);
}

.teal {
    color: var(--teal);
}

.alert-text {
    color: var(--alert);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--glow);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

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

/* ================================ */
/* Core Footer                      */
/* ================================ */
.core-footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--dim);
    max-width: 400px;
}

.footer-line {
    width: 30px;
    height: 1px;
    background: var(--dim);
    opacity: 0.3;
}

.footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--dim);
    opacity: 0.5;
    letter-spacing: 0.08em;
}

/* ================================ */
/* Fade-in utility                  */
/* ================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================ */
/* Responsive                       */
/* ================================ */
@media (max-width: 768px) {
    .cascade-stack {
        width: 300px;
        height: 240px;
    }

    .panel-mid { top: 16px; left: 16px; }
    .panel-front { top: 32px; left: 32px; }

    .margin-meta { display: none; }

    .proxy-layer {
        padding: 4rem 1.2rem;
        gap: 2rem;
    }

    .stacking-panel {
        padding: 1.5rem;
    }

    .privacy-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .route-viz {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .route-line {
        width: 20px;
    }

    .panel-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .connection-status {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .cascade-stack {
        width: 260px;
        height: 200px;
    }

    .brand-name {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.15rem;
    }

    .terminal-line {
        font-size: 0.7rem;
    }

    .connection-status {
        display: none;
    }
}
