/* =====================================================
   DSTAT - Cyberpunk Dashboard Styles
   ===================================================== */

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 26, 0.7);
    --bg-card-hover: rgba(25, 25, 40, 0.8);

    --accent-cyan: #00f0ff;
    --accent-cyan-dim: rgba(0, 240, 255, 0.3);
    --accent-purple: #a855f7;
    --accent-purple-dim: rgba(168, 85, 247, 0.3);
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --accent-pink: #ec4899;

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.2);

    /* Typography */
    --font-primary: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --container-max: 1200px;
    --section-gap: 4rem;

    /* Effects */
    --glass-blur: blur(20px);
    --glow-cyan: 0 0 30px rgba(0, 240, 255, 0.4);
    --glow-purple: 0 0 30px rgba(168, 85, 247, 0.4);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* =====================================================
   Interactive Parallax Background
   ===================================================== */

.parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.nebula-layer {
    z-index: 1;
}

.network-layer {
    z-index: 2;
}

.debris-layer {
    z-index: 3;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* =====================================================
   Target URL Display
   ===================================================== */

.target-url-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 100px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 0 30px rgba(0, 240, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: url-glow 3s ease-in-out infinite;
}

@keyframes url-glow {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(0, 240, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 50px rgba(0, 240, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

.url-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.url-label svg {
    width: 18px;
    height: 18px;
}

.url-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.url-value:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0 3rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.title-accent {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Dashboard Card */
.dashboard-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title h2 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.icon-pulse {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
    animation: icon-glow 2s ease-in-out infinite;
}

@keyframes icon-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px var(--accent-cyan));
    }

    50% {
        filter: drop-shadow(0 0 15px var(--accent-cyan));
    }
}

.card-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-green);
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Metrics Header */
.metrics-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
}

.metric {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.metric:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-glow);
}

.metric-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.metric-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: transform 0.15s ease;
}

.metric-primary {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(0, 240, 255, 0.02));
    border-color: rgba(0, 240, 255, 0.3);
}

.metric-primary .metric-value {
    color: var(--accent-cyan);
    text-shadow: 0 0 20px var(--accent-cyan);
    font-size: 2rem;
}

/* Graph Container */
.graph-container {
    padding: 1.5rem;
    position: relative;
}

.graph-legend {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 3px;
    border-radius: 2px;
}

.legend-connections {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
    box-shadow: 0 0 10px var(--accent-purple);
}

.graph-wrapper {
    display: flex;
    gap: 0.75rem;
    height: 300px;
}

.y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    text-align: right;
    min-width: 40px;
}

#metrics-graph {
    flex: 1;
    border-radius: 8px;
    background:
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    border: 1px solid var(--border-color);
}

.x-axis {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0 0 50px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.graph-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 0 0 50px;
    margin-top: 0.5rem;
}

.graph-labels span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* FAQ Section */
.faq-section {
    margin-top: var(--section-gap);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--border-glow);
}

.faq-item.active {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--accent-cyan);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.test-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(168, 85, 247, 0.1));
    border: 1px solid var(--accent-cyan);
    border-radius: 12px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.test-link:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(168, 85, 247, 0.15));
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}

.test-link svg {
    width: 18px;
    height: 18px;
}

/* Footer */
.footer {
    margin-top: var(--section-gap);
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .target-url-display {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }

    .url-value {
        font-size: 0.8rem;
    }

    .metrics-header {
        padding: 1rem;
    }

    .metric {
        min-width: calc(50% - 0.5rem);
    }

    .graph-wrapper {
        height: 200px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .metric-primary .metric-value {
        font-size: 1.5rem;
    }

    .faq-question {
        font-size: 0.9rem;
        padding: 1rem;
    }

    .test-link {
        font-size: 0.75rem;
        padding: 0.75rem 1rem;
    }
}