/* ==================================================================
   LYL Connect SpeedTest – Premium UI v2.0
   Matches the Next.js original design with glassmorphism, gradients
   ================================================================== */

/* ===========================
   VARIABLES
   =========================== */
:root {
    --st-slate-950: #020617;
    --st-slate-900: #0f172a;
    --st-slate-800: #1e293b;
    --st-slate-700: #334155;
    --st-slate-600: #475569;
    --st-slate-500: #64748b;
    --st-slate-400: #94a3b8;
    --st-slate-300: #cbd5e1;
    --st-cyan-500: #06b6d4;
    --st-cyan-400: #22d3ee;
    --st-blue-600: #2563eb;
    --st-blue-500: #3b82f6;
    --st-blue-400: #60a5fa;
    --st-purple-500: #a855f7;
    --st-purple-400: #c084fc;
    --st-pink-500: #ec4899;
    --st-pink-400: #f472b6;
    --st-teal-500: #14b8a6;
    --st-teal-400: #2dd4bf;
    --st-emerald-500: #10b981;
    --st-emerald-400: #34d399;
    --st-green-400: #4ade80;
    --st-yellow-400: #facc15;
    --st-orange-400: #fb923c;
    --st-orange-500: #f97316;
    --st-red-400: #f87171;
    --st-red-500: #ef4444;
    --st-amber-500: #f59e0b;
    --st-lime-500: #84cc16;
}

/* ===========================
   APP CONTAINER
   =========================== */
.speedtest-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===========================
   PAGE HEADER
   =========================== */
.speedtest-page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.speedtest-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.speedtest-badge.cyan {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--st-cyan-400);
}

.speedtest-badge.purple {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--st-purple-400);
}

.speedtest-badge.teal {
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.2);
    color: var(--st-teal-400);
}

.speedtest-page-title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
}

.speedtest-page-title .accent-cyan {
    background: linear-gradient(to right, var(--st-cyan-500), var(--st-blue-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.speedtest-page-title .accent-purple {
    background: linear-gradient(to right, var(--st-purple-500), var(--st-pink-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.speedtest-page-title .accent-teal {
    background: linear-gradient(to right, var(--st-teal-500), var(--st-emerald-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.speedtest-page-subtitle {
    font-size: 1.25rem;
    color: var(--st-slate-400);
    max-width: 42rem;
    margin: 0 auto;
}

/* ===========================
   TABS
   =========================== */
.speedtest-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.speedtest-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.5);
    color: var(--st-slate-400);
}

.speedtest-tab:hover {
    color: #fff;
    background: var(--st-slate-800);
}

.speedtest-tab.active[data-tab="speed"] {
    background: linear-gradient(to right, var(--st-cyan-500), var(--st-blue-500));
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.4);
}

.speedtest-tab.active[data-tab="gaming"] {
    background: linear-gradient(to right, var(--st-purple-500), var(--st-pink-500));
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.4);
}

.speedtest-tab.active[data-tab="custom"] {
    background: linear-gradient(to right, var(--st-teal-500), var(--st-emerald-500));
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(20, 184, 166, 0.4);
}

.speedtest-tab span {
    display: none;
}

@media (min-width: 640px) {
    .speedtest-tab span {
        display: inline;
    }
}

/* ===========================
   WIDGET CARD
   =========================== */
.speedtest-widget {
    position: relative;
    max-width: 42rem;
    margin: 0 auto 4rem;
    border-radius: 1.5rem;
    border: 1px solid var(--st-slate-800);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
}

.speedtest-widget-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), transparent 50%, rgba(6, 182, 212, 0.05));
}

.speedtest-widget-bg.gaming {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), transparent 50%, rgba(236, 72, 153, 0.05));
}

.speedtest-widget-bg.custom {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05), transparent 50%, rgba(16, 185, 129, 0.05));
}

.speedtest-widget-glow-1,
.speedtest-widget-glow-2 {
    position: absolute;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
}

.speedtest-widget-glow-1 {
    top: -4rem;
    right: -4rem;
    background: rgba(59, 130, 246, 0.1);
}

.speedtest-widget-glow-2 {
    bottom: -4rem;
    left: -4rem;
    background: rgba(6, 182, 212, 0.1);
}

.speedtest-widget-glow-1.gaming {
    background: rgba(168, 85, 247, 0.1);
}

.speedtest-widget-glow-2.gaming {
    background: rgba(236, 72, 153, 0.1);
}

.speedtest-widget-glow-1.custom {
    background: rgba(20, 184, 166, 0.1);
}

.speedtest-widget-glow-2.custom {
    background: rgba(16, 185, 129, 0.1);
}

.speedtest-widget-inner {
    position: relative;
    z-index: 10;
    padding: 2rem;
}

/* ===========================
   WIDGET HEADER
   =========================== */
.speedtest-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.speedtest-widget-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.speedtest-widget-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.speedtest-widget-title p {
    font-size: 0.875rem;
    color: var(--st-slate-400);
    margin: 0;
}

.speedtest-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--st-blue-500), var(--st-cyan-500));
    color: #fff;
    flex-shrink: 0;
}

.speedtest-icon-box.gaming {
    background: linear-gradient(135deg, var(--st-purple-500), var(--st-pink-500));
}

.speedtest-icon-box.custom {
    background: linear-gradient(135deg, var(--st-teal-500), var(--st-emerald-500));
}

.speedtest-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--st-slate-800);
    border: none;
    color: var(--st-slate-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.speedtest-reset-btn:hover {
    background: var(--st-slate-700);
    color: #fff;
}

/* ===========================
   MAIN CONTENT AREA
   =========================== */
.speedtest-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===========================
   START BUTTON (Speed)
   =========================== */
.speedtest-start-btn {
    position: relative;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--st-blue-600), var(--st-cyan-500));
    padding: 4px;
    border: none;
    cursor: pointer;
    box-shadow: 0 20px 60px -15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.speedtest-start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 70px -15px rgba(59, 130, 246, 0.5);
}

.speedtest-start-btn:active {
    transform: scale(0.95);
}

.speedtest-start-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--st-slate-900);
    color: var(--st-blue-400);
    transition: background 0.3s ease;
}

.speedtest-start-btn:hover .speedtest-start-inner {
    background: var(--st-slate-800);
}

.speedtest-start-inner svg {
    margin-bottom: 0.5rem;
}

.speedtest-start-inner span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--st-slate-300);
}

.speedtest-start-btn:hover .speedtest-start-inner span {
    color: #fff;
}

.speedtest-start-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--st-blue-400), var(--st-cyan-400));
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.speedtest-start-btn:hover .speedtest-start-glow {
    opacity: 0.2;
}

.speedtest-hint {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--st-slate-400);
}

/* ===========================
   GAUGE (circle)
   =========================== */
.speedtest-gauge {
    position: relative;
    width: 12rem;
    height: 12rem;
    margin: 0 auto 1.5rem;
}

.speedtest-gauge.gaming {
    width: 10rem;
    height: 10rem;
}

.speedtest-gauge svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.speedtest-gauge-bg {
    fill: none;
    stroke: var(--st-slate-800);
    stroke-width: 8;
}

.speedtest-gauge-fill {
    fill: none;
    stroke: url(#speedGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.speedtest-gauge-fill.gaming {
    stroke: url(#gamingGradient);
}

.speedtest-gauge-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.speedtest-gauge-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--st-cyan-400);
    line-height: 1;
}

.speedtest-gauge-value.gaming-pct {
    font-size: 1.25rem;
    color: #fff;
    margin-top: 0.5rem;
}

.speedtest-gauge-unit {
    font-size: 0.875rem;
    color: var(--st-slate-400);
}

.gaming-gauge-icon {
    animation: pulse 2s ease-in-out infinite;
}

/* ===========================
   PHASE INDICATOR
   =========================== */
.speedtest-phase {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.speedtest-phase.phase-ping {
    color: var(--st-blue-400);
}

.speedtest-phase.phase-download {
    color: var(--st-cyan-400);
}

.speedtest-phase.phase-upload {
    color: var(--st-emerald-400);
}

.speedtest-phase.phase-gaming {
    color: var(--st-purple-400);
}

.speedtest-phase.phase-custom {
    color: var(--st-teal-400);
}

.phase-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* ===========================
   PROGRESS BAR
   =========================== */
.speedtest-progress {
    width: 100%;
    max-width: 16rem;
    height: 0.5rem;
    background: var(--st-slate-800);
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto;
}

.speedtest-progress.custom {
    height: 0.75rem;
}

.speedtest-progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--st-blue-500), var(--st-cyan-500));
    border-radius: 999px;
    transition: width 0.3s ease;
}

.speedtest-progress-fill.custom {
    background: linear-gradient(to right, var(--st-teal-500), var(--st-emerald-500));
}

.speedtest-running-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--st-slate-500);
}

/* ===========================
   RESULTS
   =========================== */
.speedtest-results-main {
    text-align: center;
    margin-bottom: 2rem;
}

.speedtest-results-main .value {
    font-size: 3.75rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--st-cyan-400), var(--st-blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.speedtest-results-main .label {
    font-size: 1.25rem;
    color: var(--st-slate-400);
    margin-top: 0.25rem;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.speedtest-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

@media (min-width: 640px) {
    .speedtest-results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.speedtest-result-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    animation: slideUp 0.4s ease-out both;
}

.speedtest-result-card:nth-child(1) {
    animation-delay: 0.1s;
}

.speedtest-result-card:nth-child(2) {
    animation-delay: 0.2s;
}

.speedtest-result-card:nth-child(3) {
    animation-delay: 0.3s;
}

.speedtest-result-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.speedtest-result-card svg {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 auto 0.5rem;
    display: block;
}

.speedtest-result-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.speedtest-result-card .label {
    font-size: 0.75rem;
    color: var(--st-slate-400);
    margin-top: 0.25rem;
}

/* Color classes for result values */
.color-emerald {
    color: var(--st-emerald-400) !important;
}

.color-green {
    color: var(--st-green-400) !important;
}

.color-yellow {
    color: var(--st-yellow-400) !important;
}

.color-orange {
    color: var(--st-orange-400) !important;
}

.color-red {
    color: var(--st-red-400) !important;
}

.speedtest-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.5);
    font-size: 0.875rem;
    color: var(--st-slate-300);
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease-out 0.5s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.speedtest-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: var(--st-slate-800);
    border: none;
    color: var(--st-slate-300);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.speedtest-retry-btn:hover {
    background: var(--st-slate-700);
    color: #fff;
}

.speedtest-footer-note {
    font-size: 0.75rem;
    color: var(--st-slate-500);
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--st-slate-800);
    margin-top: 1.5rem;
    line-height: 1.5;
}

.speedtest-footer-note.custom strong {
    color: var(--st-teal-400);
}

/* ===========================
   GAMING SELECT
   =========================== */
.gaming-select-view {
    min-height: 400px;
}

.gaming-select-label {
    color: var(--st-slate-300);
    text-align: center;
    margin-bottom: 1.5rem;
}

.gaming-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .gaming-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gaming-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 1rem;
    border: 2px solid rgba(51, 65, 85, 0.5);
    background: rgba(30, 41, 59, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gaming-game-card:hover {
    transform: scale(1.05);
    border-color: var(--st-slate-600);
}

.gaming-game-card .game-emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.gaming-game-card .game-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
}

/* Selected game colors */
.gaming-game-card.selected[data-color="red-orange"] {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.gaming-game-card.selected[data-color="blue-cyan"] {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.gaming-game-card.selected[data-color="purple-pink"] {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
}

.gaming-game-card.selected[data-color="orange-yellow"] {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

.gaming-game-card.selected[data-color="green-emerald"] {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.gaming-game-card.selected[data-color="red"] {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

.gaming-game-card.selected[data-color="amber-orange"] {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.gaming-game-card.selected[data-color="lime-green"] {
    background: rgba(132, 204, 22, 0.1);
    border-color: rgba(132, 204, 22, 0.3);
}

/* ===========================
   GAMING REQUIREMENTS
   =========================== */
.gaming-requirements {
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.gaming-req-title {
    font-size: 0.875rem;
    color: var(--st-slate-300);
    margin-bottom: 0.5rem;
}

.gaming-req-title strong {
    color: #fff;
}

.gaming-req-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--st-slate-400);
}

.gaming-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.gaming-start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px -10px rgba(168, 85, 247, 0.4);
}

/* Dynamic game start colors */
.gaming-start-btn[data-game-color="red-orange"] {
    background: linear-gradient(to right, var(--st-red-500), var(--st-orange-500));
}

.gaming-start-btn[data-game-color="blue-cyan"] {
    background: linear-gradient(to right, var(--st-blue-500), var(--st-cyan-500));
}

.gaming-start-btn[data-game-color="purple-pink"] {
    background: linear-gradient(to right, var(--st-purple-500), var(--st-pink-500));
}

.gaming-start-btn[data-game-color="orange-yellow"] {
    background: linear-gradient(to right, var(--st-orange-500), var(--st-yellow-400));
}

.gaming-start-btn[data-game-color="green-emerald"] {
    background: linear-gradient(to right, var(--st-green-400), var(--st-emerald-500));
}

.gaming-start-btn[data-game-color="red"] {
    background: linear-gradient(to right, #dc2626, var(--st-red-400));
}

.gaming-start-btn[data-game-color="amber-orange"] {
    background: linear-gradient(to right, var(--st-amber-500), var(--st-orange-500));
}

.gaming-start-btn[data-game-color="lime-green"] {
    background: linear-gradient(to right, var(--st-lime-500), #16a34a);
}

/* ===========================
   GAMING RUNNING
   =========================== */
.gaming-running-emoji {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.gaming-running-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.gaming-running-subtitle {
    color: var(--st-slate-400);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ===========================
   GAMING RESULTS
   =========================== */
.gaming-result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gaming-result-emoji-big {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.gaming-result-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.gaming-suitability {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease 0.5s both;
}

.gaming-suitability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 500;
}

.gaming-suitability-badge.competitivo {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--st-emerald-400);
}

.gaming-suitability-badge.casual {
    background: rgba(250, 204, 21, 0.2);
    border: 1px solid rgba(250, 204, 21, 0.3);
    color: var(--st-yellow-400);
}

.gaming-suitability-badge.no-recomendado {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--st-red-400);
}

/* ===========================
   CUSTOM DOMAIN
   =========================== */
.custom-input-view {
    min-height: 350px;
}

.custom-intro {
    color: var(--st-slate-300);
    text-align: center;
    margin-bottom: 1.5rem;
}

.text-teal {
    color: var(--st-teal-400) !important;
}

.custom-input-wrapper {
    position: relative;
    max-width: 28rem;
    margin: 0 auto 1.5rem;
}

.custom-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--st-slate-400);
    pointer-events: none;
}

.custom-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--st-slate-700);
    border-radius: 1rem;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.custom-input::placeholder {
    color: var(--st-slate-500);
}

.custom-input:focus {
    outline: none;
    border-color: var(--st-teal-500);
}

.custom-presets {
    margin-bottom: 2rem;
}

.custom-presets-label {
    font-size: 0.75rem;
    color: var(--st-slate-500);
    text-align: center;
    margin-bottom: 0.75rem;
}

.custom-presets-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.custom-preset {
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.5);
    color: var(--st-slate-400);
    cursor: pointer;
    transition: all 0.2s;
}

.custom-preset:hover {
    color: #fff;
    border-color: var(--st-slate-600);
}

.custom-preset.active {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.5);
    color: var(--st-teal-400);
}

.custom-start-area {
    text-align: center;
    margin-bottom: 2rem;
}

.custom-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    background: linear-gradient(to right, var(--st-teal-500), var(--st-emerald-500));
    color: #fff;
    transition: all 0.3s ease;
}

.custom-start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px -10px rgba(20, 184, 166, 0.4);
}

.custom-start-btn.disabled {
    background: var(--st-slate-800);
    color: var(--st-slate-500);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.custom-info-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.custom-info-icon {
    color: var(--st-teal-400);
    flex-shrink: 0;
    margin-top: 2px;
}

.custom-info-title {
    font-weight: 500;
    color: var(--st-slate-300);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.custom-info-text {
    font-size: 0.875rem;
    color: var(--st-slate-400);
    line-height: 1.5;
    margin: 0;
}

/* Custom running */
.custom-running-icon {
    display: block;
    margin: 0 auto 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.custom-running-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.custom-running-subtitle {
    color: var(--st-slate-400);
    margin-bottom: 2rem;
}

/* Custom results */
.custom-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.2);
    border: 1px solid rgba(20, 184, 166, 0.3);
    color: var(--st-teal-400);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.custom-result-host {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2rem;
}

.custom-quality-badge {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease 0.5s both;
}

.custom-quality-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(51, 65, 85, 0.5);
    font-size: 1.125rem;
    font-weight: 700;
}

/* ===========================
   INFO CARDS
   =========================== */
.speedtest-info-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 56rem;
    margin: 0 auto 4rem;
}

@media (min-width: 768px) {
    .speedtest-info-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.speedtest-info-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--st-slate-800);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.speedtest-info-card.hover-cyan:hover {
    border-color: rgba(6, 182, 212, 0.3);
}

.speedtest-info-card.hover-blue:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.speedtest-info-card.hover-purple:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.speedtest-info-card.hover-pink:hover {
    border-color: rgba(236, 72, 153, 0.3);
}

.speedtest-info-card.hover-orange:hover {
    border-color: rgba(249, 115, 22, 0.3);
}

.speedtest-info-card.hover-teal:hover {
    border-color: rgba(20, 184, 166, 0.3);
}

.speedtest-info-card.hover-emerald:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.info-icon.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--st-cyan-400);
}

.info-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--st-blue-400);
}

.info-icon.purple {
    background: rgba(168, 85, 247, 0.1);
    color: var(--st-purple-400);
}

.info-icon.pink {
    background: rgba(236, 72, 153, 0.1);
    color: var(--st-pink-400);
}

.info-icon.orange {
    background: rgba(249, 115, 22, 0.1);
    color: var(--st-orange-400);
}

.info-icon.teal {
    background: rgba(20, 184, 166, 0.1);
    color: var(--st-teal-400);
}

.info-icon.emerald {
    background: rgba(16, 185, 129, 0.1);
    color: var(--st-emerald-400);
}

.speedtest-info-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.speedtest-info-card p {
    font-size: 0.875rem;
    color: var(--st-slate-400);
    line-height: 1.6;
    margin: 0;
}

/* ===========================
   TIPS SECTION
   =========================== */
.speedtest-tips {
    max-width: 48rem;
    margin: 0 auto 4rem;
}

.speedtest-tips h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

.speedtest-tips-box {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--st-slate-800);
    border-radius: 1rem;
    padding: 1.5rem;
}

.speedtest-tips-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.speedtest-tips-box li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip-num {
    font-weight: 700;
    flex-shrink: 0;
}

.tip-num.cyan {
    color: var(--st-cyan-400);
}

.tip-num.purple {
    color: var(--st-purple-400);
}

.tip-num.teal {
    color: var(--st-teal-400);
}

.speedtest-tips-box li span:last-child {
    color: var(--st-slate-300);
    line-height: 1.5;
}

.speedtest-tips-box li span:last-child strong {
    color: #fff;
}

/* ===========================
   CTA
   =========================== */
.speedtest-cta {
    text-align: center;
    margin-top: 4rem;
}

.speedtest-cta p {
    color: var(--st-slate-400);
    margin-bottom: 1rem;
}

.speedtest-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(to right, var(--st-blue-600), var(--st-cyan-500));
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.speedtest-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px -10px rgba(59, 130, 246, 0.4);
    color: #fff;
    text-decoration: none;
}

/* ===========================
   TAB CONTENT
   =========================== */
.speedtest-tab-content {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 640px) {
    .speedtest-widget-inner {
        padding: 1.5rem;
    }

    .speedtest-gauge {
        width: 10rem;
        height: 10rem;
    }

    .speedtest-results-main .value {
        font-size: 2.5rem;
    }

    .gaming-grid {
        gap: 0.5rem;
    }

    .gaming-game-card {
        padding: 0.75rem;
    }

    .gaming-game-card .game-emoji {
        font-size: 1.5rem;
    }

    .gaming-game-card .game-name {
        font-size: 0.75rem;
    }

    .gaming-req-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .speedtest-info-card {
        padding: 1.25rem;
    }
}