/* Inherit variables from shared/base.css */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 26, 0.8);
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --text-primary: #e4e4e7;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --font-mono: 'JetBrains Mono', monospace;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Hero Section */
.hero-section {
    padding-top: 100px;
    padding-bottom: 40px;
    background: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
}

.center-align {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Speed Card (Gauge) */
.speed-card {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 16/9;
    margin-bottom: 30px;
}

.gauge-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas#speedGauge {
    width: 100%;
    height: 100%;
}

.gauge-value {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#mainSpeedValue {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    display: block;
    line-height: 1;
}

#mainGaugeLabel {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

.control-area {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.start-btn {
    padding: 10px 25px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50px;
    color: #0a0a0f;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.start-btn:hover {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    transform: translateX(-50%) scale(1.05);
}

.start-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 800px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.3s ease;
}

.metric-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.metric-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.metric-icon.active,
.metric-icon.download.active,
.metric-icon.upload.active {
    color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
}

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

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.metric-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.metric-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Analysis Section */
.analysis-section {
    padding-top: 40px;
    padding-bottom: 60px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

/* Info Cards Grid */
.info-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.info-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.info-card.full-width {
    grid-column: 1 / -1;
}

.info-card h3 {
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h3 svg {
    opacity: 0.7;
}

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

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
}

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

.info-item .label {
    color: var(--text-muted);
}

.info-item .value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: right;
    word-break: break-all;
    max-width: 60%;
}

/* Copyable Elements */
.copyable {
    cursor: pointer;
    position: relative;
}

.copyable:hover {
    background: rgba(0, 212, 255, 0.05);
    border-radius: 4px;
}

.copy-icon {
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 8px;
}

.copyable:hover .copy-icon {
    opacity: 1;
}

.copyable.copied .copy-icon {
    opacity: 1;
}

/* User Agent Box */
.ua-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ua-box code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
    line-height: 1.5;
}

/* Score Display */
.highlight .score-display {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 10px;
}

.big-score {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: #00ff88;
    font-family: var(--font-mono);
}

.score-detail {
    display: flex;
    flex-direction: column;
}

.score-detail span {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.score-detail small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    height: 250px;
    display: flex;
    flex-direction: column;
}

.chart-wrapper h3 {
    font-size: 0.8rem;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

.chart-wrapper canvas {
    flex-grow: 1;
    width: 100% !important;
    max-height: 180px;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .info-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .info-grid-4 {
        grid-template-columns: 1fr;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }
}