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

body {
    background-color: #080a10;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Glow Blobs */
.background-glows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    mix-blend-mode: screen;
}

.glow-1 {
    top: 15%;
    left: 20%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #00f2fe 0%, #4facfe 100%);
    animation: floatGlow 12s ease-in-out infinite alternate;
}

.glow-2 {
    bottom: 15%;
    right: 20%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #f857a6 0%, #ff5858 100%);
    animation: floatGlow 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -40px) scale(1.1); }
}

/* Glassmorphism Container */
.glass-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 860px;
    background: rgba(13, 17, 30, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: center;
}

/* Header */
.header {
    margin-bottom: 35px;
}

.logo {
    height: 52px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.1));
}

.title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.95rem;
    color: #94a3b8;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Test Panel Layout */
.test-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Gauges Row */
.gauges-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
    margin-bottom: 10px;
}

.gauge-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 25px;
    width: 280px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.gauge-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-bottom: 20px;
}

/* SVG Gauge Styling */
.gauge-container {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto;
}

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

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 10;
}

.gauge-progress {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    /* Circumference = 2 * pi * 80 = 502.65 */
    stroke-dasharray: 502.65;
    stroke-dashoffset: 502.65;
    transition: stroke-dashoffset 0.35s ease;
}

.dl-progress {
    stroke: url(#dl-gradient);
}

/* We create SVG gradients dynamically in HTML or style them here with CSS variable */
.dl-progress {
    stroke: #00f2fe;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.5));
}

.ul-progress {
    stroke: #f857a6;
    filter: drop-shadow(0 0 8px rgba(248, 87, 166, 0.5));
}

/* Gauge Text Overlay */
.gauge-value-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.gauge-unit {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* Neon Glow behind card */
.gauge-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: opacity 0.5s ease;
}

.gauge-card.active .gauge-glow {
    opacity: 0.2;
}

.dl-glow {
    background: #00f2fe;
}

.ul-glow {
    background: #f857a6;
}

/* Metadata Grid */
.metadata-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

.card-blur {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease;
    text-align: left;
}

.card-blur:hover {
    background: rgba(255, 255, 255, 0.05);
}

.meta-details {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 2px;
}

.meta-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
}

/* Icons using pure CSS shapes or colors for speed & aesthetics */
.meta-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    position: relative;
    flex-shrink: 0;
}

.meta-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-repeat: no-repeat;
    background-size: contain;
}

.icon-ping { background-color: rgba(0, 242, 254, 0.1); }
.icon-ping::after {
    width: 10px;
    height: 10px;
    border: 2px solid #00f2fe;
    border-radius: 50%;
    box-shadow: 0 0 8px #00f2fe;
}

.icon-jitter { background-color: rgba(248, 87, 166, 0.1); }
.icon-jitter::after {
    width: 12px;
    height: 6px;
    border-top: 2px solid #f857a6;
    border-bottom: 2px solid #f857a6;
}

.icon-ip { background-color: rgba(165, 180, 252, 0.1); }
.icon-ip::after {
    width: 10px;
    height: 10px;
    background: #a5b4fc;
    clip-path: polygon(50% 0%, 100% 35%, 82% 100%, 18% 100%, 0% 35%);
}

.icon-isp { background-color: rgba(250, 204, 21, 0.1); }
.icon-isp::after {
    width: 10px;
    height: 10px;
    background: #eab308;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Status Message */
.status-message-container {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-message {
    font-size: 0.9rem;
    color: #a5b4fc;
    letter-spacing: 0.5px;
    animation: pulseText 2s infinite ease-in-out;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: 0 0 8px rgba(165, 180, 252, 0.4); }
}

/* Buttons */
.action-box {
    margin-top: 10px;
}

.btn-start {
    position: relative;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 50px;
    padding: 16px 48px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #080a10;
    letter-spacing: 1.5px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 242, 254, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-start:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.6);
}

.btn-start:active {
    transform: translateY(1px) scale(0.98);
}

.btn-text {
    position: relative;
    z-index: 5;
}

.btn-start.running {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.btn-start.running:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}

/* Footer */
.footer {
    margin-top: 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.footer-note {
    font-size: 0.85rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 5px;
}

.copyright {
    font-size: 0.7rem;
    color: #475569;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-container {
        padding: 30px 20px;
    }

    .gauges-row {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .metadata-grid {
        grid-template-columns: 1fr 1fr;
    }

    .full-width-sm {
        grid-column: span 2;
    }

    .title {
        font-size: 1.8rem;
    }
}

/* App 3-column Layout & Promo Cards */
.app-layout {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 30px;
    width: 95%;
    max-width: 1480px;
    margin: 40px auto;
    z-index: 10;
}

.promo-card {
    background: rgba(13, 17, 30, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 35px 28px;
    width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.promo-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.promo-left {
    border-left: 3px solid #00f2fe;
}

.promo-right {
    border-left: 3px solid #f857a6;
}

.promo-badge {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0, 242, 254, 0.1);
    color: #00f2fe;
    margin-bottom: 20px;
}

.promo-badge.gold {
    background: rgba(250, 204, 21, 0.1);
    color: #eab308;
}

.promo-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.promo-text {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

.promo-speed-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 14px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
}

.promo-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.promo-left .promo-btn {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #080a10;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.promo-left .promo-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
    transform: scale(1.02);
}

.promo-right .promo-btn {
    background: linear-gradient(135deg, #f857a6 0%, #ff5858 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(248, 87, 166, 0.2);
}

.promo-right .promo-btn:hover {
    box-shadow: 0 6px 20px rgba(248, 87, 166, 0.4);
    transform: scale(1.02);
}

/* Responsiveness for side banners */
@media (max-width: 1240px) {
    .app-layout {
        flex-direction: column;
        align-items: center;
        width: 90%;
    }
    
    .promo-card {
        width: 100%;
        max-width: 860px;
        flex-direction: row;
        gap: 20px;
        align-items: center;
        justify-content: space-between;
        padding: 24px;
    }

    .promo-badge {
        margin-bottom: 0;
    }

    .promo-title {
        margin-bottom: 4px;
        font-size: 1.3rem;
    }

    .promo-text {
        margin-bottom: 0;
        max-width: 350px;
    }

    .promo-speed-badge {
        margin-bottom: 0;
        padding: 8px 12px;
    }

    .promo-btn {
        width: auto;
        padding: 10px 24px;
    }
}

@media (max-width: 768px) {
    .promo-card {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 20px;
    }

    .promo-text {
        max-width: none;
    }
}

/* Flyer Image-Only Sidebar Card Styles */
.promo-card.image-only {
    padding: 10px;
    cursor: pointer;
    background: rgba(13, 17, 30, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-flyer-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.promo-flyer-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.promo-card.image-only:hover .promo-flyer-img {
    transform: scale(1.05);
}

/* Responsiveness for Flyer cards (keeps vertical aspect ratio on smaller viewports) */
@media (max-width: 1240px) {
    .promo-card.image-only {
        width: 320px !important;
        max-width: 320px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 15px auto !important;
        padding: 10px !important;
    }
}

