/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Importar fontes do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Variáveis CSS para cores */
:root {
    --primary-color: #2a2a2a;
    --secondary-color: #3a3a3a;
    --accent-color: #4a4a4a;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --white: #ffffff;
    --background-overlay: rgba(0, 0, 0, 0.6);
    --button-hover: #1a1a1a;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Estilos do body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: url('../images/background.png') center center / cover no-repeat fixed;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
}

/* Overlay para melhorar legibilidade */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-overlay);
    z-index: -1;
}

/* Container principal */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Header com logo - estilos restaurados e aprimorados */
.header {
    padding: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinhar à esquerda */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: transparent; /* Manter transparente por padrão */
}

.logo {
    height: 35px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
    opacity: 0.9;
    display: block; /* Garantir que seja exibido como bloco */
    max-width: 100%;
    object-fit: contain;
}

.logo:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Skip link para acessibilidade - ocultar completamente */
.skip-link {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Ocultar completamente o título SEO */
.seo-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Layout container com três colunas - ajustado para dispositivos móveis */
.layout-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh; /* Usar dynamic viewport height para melhor suporte mobile */
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    grid-template-areas: "left-ad main-content right-ad";
    z-index: 5;
    overflow: hidden;
}

/* Área principal - Centralização perfeita */
.main-content {
    grid-area: main-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 2vw, 2rem);
    gap: clamp(1.5rem, 3vw, 2rem);
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

/* Título principal com tipografia fluida */
.main-title {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 300;
    text-align: center;
    margin: 0;
    letter-spacing: clamp(0.5px, 0.1vw, 1px);
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Estilos para o gráfico e área de teste */
.test-interface {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: opacity 0.5s ease-in-out;
    width: 100%;
    min-height: 80vh;
    min-height: 80dvh;
}

.chart-container {
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-in-out;
}

.chart-container.show {
    opacity: 1;
    transform: translateY(0);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-title {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
}

.chart-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.test-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.result-value {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    font-weight: 600;
}

#downloadResult,
#uploadResult,
#pingResult,
#jitterResult {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Container para ping e jitter lado a lado */
.ping-jitter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.ping-result,
.jitter-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 480px) {
    .ping-jitter-container {
        gap: 10px;
        flex-direction: column;
    }
    
    .ping-result .result-label,
    .jitter-result .result-label {
        font-size: 0.9rem;
    }
    
    .ping-result .result-value,
    .jitter-result .result-value {
        font-size: 1rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .chart-wrapper {
        padding: 1rem;
    }
    
    .test-results {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-item {
        padding: 0.8rem;
    }
    
    .result-label {
        font-size: 0.8rem;
    }
    
    .result-value {
        font-size: 1rem;
    }
}

/* Menu de Teste Avançado */
.advanced-test-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/background.png') center center / cover no-repeat fixed;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.advanced-test-menu.show {
    opacity: 1;
    visibility: visible;
}

.advanced-test-menu.hidden {
    opacity: 0;
    visibility: hidden;
}

.advanced-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px) clamp(15px, 3vw, 20px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

.advanced-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(20px, 4vw, 40px);
    color: white;
    flex-wrap: wrap;
    gap: 1rem;
}

.advanced-menu-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    touch-action: manipulation;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-button:active {
    transform: translateY(0);
}

.back-button:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.advanced-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(15px, 3vw, 25px);
    flex: 1;
    width: 100%;
}

.test-option {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    touch-action: manipulation;
}

.test-option:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.test-option:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.test-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.test-option h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 15px 0 10px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.test-option p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

/* Estilos para resultados dos testes avançados */
.security-results, .dns-results, .ip-version-results, .gaming-results,
.video-results, .streaming-results, .traceroute-results, .packet-loss-results,
.bufferbloat-results, .latency-results {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Estilo da barra de rolagem para resultados */
.streaming-results::-webkit-scrollbar,
.gaming-results::-webkit-scrollbar,
.video-results::-webkit-scrollbar,
.latency-results::-webkit-scrollbar {
    width: 8px;
}

.streaming-results::-webkit-scrollbar-track,
.gaming-results::-webkit-scrollbar-track,
.video-results::-webkit-scrollbar-track,
.latency-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.streaming-results::-webkit-scrollbar-thumb,
.gaming-results::-webkit-scrollbar-thumb,
.video-results::-webkit-scrollbar-thumb,
.latency-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.streaming-results::-webkit-scrollbar-thumb:hover,
.gaming-results::-webkit-scrollbar-thumb:hover,
.video-results::-webkit-scrollbar-thumb:hover,
.latency-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.security-results h3, .dns-results h3, .ip-version-results h3,
.gaming-results h3, .video-results h3, .streaming-results h3,
.traceroute-results h3, .packet-loss-results h3, .bufferbloat-results h3,
.latency-results h3 {
    color: #fff;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
}

/* Teste de Segurança */
.security-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.security-item:last-child {
    border-bottom: none;
}

/* Teste de DNS */
.dns-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    align-items: center;
}

.dns-item:last-child {
    border-bottom: none;
}

.status-ok {
    color: #4CAF50;
    font-weight: bold;
}

.status-erro {
    color: #f44336;
    font-weight: bold;
}

/* Teste IPv6 vs IPv4 */
.ip-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ip-version {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.ip-version h4 {
    color: #fff;
    margin-bottom: 10px;
}

.ip-version div {
    color: #ccc;
    margin: 5px 0;
}

/* Teste de Jogos */
.game-server {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
}

.server-name {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.server-region {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.server-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.server-stats span {
    color: #fff;
    font-size: 0.9rem;
}

.quality-excelente {
    color: #4CAF50;
    font-weight: bold;
}

.quality-boa {
    color: #8BC34A;
    font-weight: bold;
}

.quality-regular {
    color: #FF9800;
    font-weight: bold;
}

.quality-ruim {
    color: #f44336;
    font-weight: bold;
}

/* Teste de Videoconferência */
.video-platform {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
}

.platform-name {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.platform-link {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.platform-link:hover {
    color: #3b82f6;
    border-bottom: 1px solid #3b82f6;
    text-decoration: none;
}

.platform-link:visited {
    color: #fff;
}

.platform-link:visited:hover {
    color: #3b82f6;
}

.platform-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.platform-stats span {
    color: #ccc;
    font-size: 0.9rem;
}

.platform-stats span.buffer-excelente {
    color: #4CAF50 !important;
    font-weight: bold;
}

.platform-stats span.buffer-boa {
    color: #8BC34A !important;
    font-weight: bold;
}

.platform-stats span.buffer-regular {
    color: #2196F3 !important;
    font-weight: bold;
}

.platform-stats span.buffer-ruim {
    color: #DC143C !important;
    font-weight: bold;
}

/* Teste de Streaming */
.streaming-platform {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.streaming-platform:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.buffer-excelente {
    color: #4CAF50;
    font-weight: bold;
}

.buffer-boa {
    color: #8BC34A;
    font-weight: bold;
}

.buffer-regular {
    color: #2196F3;
    font-weight: bold;
}

.buffer-ruim {
    color: #DC143C;
    font-weight: bold;
}

/* Teste de Traceroute */
.hop {
    display: grid;
    grid-template-columns: 50px 2fr 1fr auto;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    align-items: center;
}

.hop:last-child {
    border-bottom: none;
}

.hop-number {
    font-weight: bold;
    text-align: center;
}

.hop-ip {
    font-family: monospace;
}

.hop-latency {
    text-align: right;
}

.destination {
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Teste de Perda de Pacotes */
.packet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat .label {
    color: #ccc;
}

.stat .value {
    color: #fff;
    font-weight: bold;
}

.loss-low {
    color: #4CAF50;
}

.loss-high {
    color: #f44336;
}

/* Teste de Bufferbloat */
.bufferbloat-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status {
    color: #FFD700;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

.bufferbloat-a\+ {
    color: #4CAF50;
}

.bufferbloat-a {
    color: #8BC34A;
}

.bufferbloat-b {
    color: #CDDC39;
}

.bufferbloat-c {
    color: #FF9800;
}

.bufferbloat-d {
    color: #FF5722;
}

.bufferbloat-f {
    color: #f44336;
}

.grade-a\+ {
    color: #4CAF50;
    font-size: 1.2rem;
}

.grade-a {
    color: #8BC34A;
    font-size: 1.2rem;
}

.grade-b {
    color: #CDDC39;
    font-size: 1.2rem;
}

.grade-c {
    color: #FF9800;
    font-size: 1.2rem;
}

.grade-d {
    color: #FF5722;
    font-size: 1.2rem;
}

.grade-f {
    color: #f44336;
    font-size: 1.2rem;
}

/* Teste de Latência para Servidores */
.server-latency {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    align-items: center;
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.server-location {
    color: #ccc;
    font-size: 0.9rem;
}

.server-ip {
    color: #999;
    font-family: monospace;
    font-size: 0.8rem;
}

.server-metrics {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: right;
}

.server-metrics .latency {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

.server-metrics .jitter {
    color: #ccc;
    font-size: 0.9rem;
}

.server-metrics .quality {
    font-weight: bold;
    font-size: 0.9rem;
}

/* Responsividade para o menu avançado */
@media (max-width: 768px) {
    .advanced-menu-container {
        padding: 20px 15px;
    }
    
    .advanced-menu-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .advanced-menu-header h2 {
        font-size: 2rem;
    }
    
    .advanced-menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .test-option {
        padding: 30px 25px;
        min-height: 120px;
        touch-action: manipulation;
    }
    
    .test-icon {
        font-size: 2.8rem;
        margin-bottom: 15px;
    }
    
    .test-option h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .test-option p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .ip-comparison {
        grid-template-columns: 1fr;
    }
    
    .dns-item {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: center;
    }
    
    .server-latency {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .server-metrics {
        text-align: center;
    }
    
    .hop {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 5px;
    }
    
    .packet-stats {
        grid-template-columns: 1fr;
    }
    
    .bufferbloat-stats {
        grid-template-columns: 1fr;
    }
    
    .platform-stats {
        grid-template-columns: 1fr;
    }
    
    .server-stats {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .advanced-menu-container {
        padding: 15px 10px;
    }
    
    .advanced-menu-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .advanced-menu-header h2 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .advanced-menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .test-option {
        padding: 25px 20px;
        min-height: 110px;
    }
    
    .test-icon {
        font-size: 2.3rem;
        margin-bottom: 12px;
    }
    
    .test-option h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .test-option p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .test-button {
        padding: 1rem 2rem;
        min-height: 52px;
        font-size: 1rem;
    }
    
    .back-button {
        padding: 12px 24px;
        min-height: 48px;
        font-size: 1rem;
    }
    
    /* Melhorias para touch devices */
    .test-button,
    .back-button,
    .header-advanced-menu-button {
        min-height: 48px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
    
    .test-button {
        padding: 1.2rem 2.5rem;
        min-height: 56px;
    }
    
    .back-button {
        padding: 15px 30px;
        min-height: 50px;
        font-size: 1.1rem;
    }
    
    /* Responsividade para resultados dos testes */
    .ip-comparison {
        grid-template-columns: 1fr;
    }
    
    .dns-item {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: center;
    }
    
    .server-latency {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .server-metrics {
        text-align: center;
    }
    
    .hop {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 5px;
    }
    
    .packet-stats {
        grid-template-columns: 1fr;
    }
    
    .bufferbloat-stats {
        grid-template-columns: 1fr;
    }
    
    .platform-stats {
        grid-template-columns: 1fr;
    }
    
    .server-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    /* Ajustes para telas pequenas */
    .security-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .dns-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .status-ok,
    .status-erro {
        font-size: 0.9rem;
    }
}

/* Estilos para informações do usuário */
.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.user-info-line {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.user-info-line span {
    color: #fff;
    font-weight: 600;
}

.test-again-button {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
    touch-action: manipulation;
}

.test-again-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.test-again-button:active {
    transform: translateY(0);
}

.test-again-button:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Botão de teste - estilos restaurados e aprimorados */
.test-button {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: clamp(1rem, 2.5vw, 1.2rem) clamp(2.5rem, 5vw, 3.5rem);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: clamp(1.5px, 0.3vw, 3px);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    min-width: clamp(180px, 25vw, 200px);
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    line-height: 1.2;
}

.test-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.test-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.test-button:hover::before {
    left: 100%;
}

.test-button:active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(0);
    transition: all 0.1s ease;
    color: #ffffff;
}

.test-button:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Botão Teste Avançado */
.advanced-test-button {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
    touch-action: manipulation;
}

.advanced-test-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.advanced-test-button:active {
    transform: translateY(0);
}

.advanced-test-button:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Responsividade para grupo de botões */
@media (max-width: 480px) {
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .test-again-button,
    .advanced-test-button {
        width: 100%;
        max-width: 250px;
    }
}

/* Seção de Teste Avançado na Introdução */
.advanced-test-intro {
    margin: 2rem 0;
    text-align: center;
    opacity: 0.9;
}

.intro-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.intro-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 400;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Layout principal para sticky footer */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.layout-container {
    flex: 1;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 300;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .intro-features {
        gap: 1rem;
    }
    
    .feature-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    .header {
        padding: 1.5rem 2rem;
        background: rgba(0, 0, 0, 0.7); /* Fundo semi-transparente em mobile */
        backdrop-filter: blur(10px);
    }
    
    .logo {
        height: 45px;
        max-height: 50px;
    }
    
    .test-button {
        padding: 1rem 2.5rem;
        font-size: 1.2rem;
    }
    
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 1.5rem;
    }
    
    .logo {
        height: 40px;
    }
    
    .test-button {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
}

/* Garantir centralização em telas muito pequenas */
@media (max-width: 320px) {
    .logo {
        height: 35px;
    }
}

/* Proteções de Segurança CSS */
* {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    pointer-events: auto !important;
}

/* Permitir seleção apenas em inputs */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Proteção contra print */
@media print {
    * {
        display: none !important;
    }
    
    body::before {
        content: "🔒 CONTEÚDO PROTEGIDO - IMPRESSÃO NÃO AUTORIZADA" !important;
        display: block !important;
        font-size: 24px !important;
        text-align: center !important;
        margin-top: 50px !important;
        color: #ff0000 !important;
    }
}

/* Proteção contra seleção de imagens */
img {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    pointer-events: none !important;
}

/* Ocultar elementos quando DevTools estão abertos */
@media (max-height: 500px) and (min-width: 800px) {
    .security-warning {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 0, 0, 0.9);
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 999999;
        font-size: 24px;
        text-align: center;
    }
}

/* Proteção contra zoom excessivo */
@media (min-resolution: 2dppx) {
    body {
        zoom: 1 !important;
        transform: scale(1) !important;
    }
}

/* Proteção adicional contra ferramentas de desenvolvedor */
.devtools-detector {
    position: absolute;
    top: -1000px;
    left: -1000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Animação de proteção */
@keyframes security-pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.security-active {
    animation: security-pulse 2s infinite;
}

/* Proteção contra highlight */
::selection {
    background: transparent !important;
}

::-moz-selection {
    background: transparent !important;
}

/* Proteção contra outline */
*:focus {
    outline: none !important;
}

/* Proteção contra resize */
* {
    resize: none !important;
}

/* Efeitos adicionais */
.test-button:focus {
    outline: none;
    box-shadow: var(--shadow-hover), 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Animação de pulso sutil */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.test-button:hover {
    animation: pulse 2s infinite;
}

/* SEO Content */
.seo-content {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.seo-content h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

.seo-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.seo-content ul {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.seo-content strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* Responsividade para conteúdo SEO */
@media (max-width: 480px) {
    .seo-content {
        padding: 1rem;
    }
    
    .seo-content h3 {
        font-size: 1.1rem;
        margin: 1rem 0 0.8rem 0;
    }
    
    .seo-content p {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .seo-content ul {
        font-size: 0.9rem;
        padding-left: 1rem;
    }
}

/* Ajustes para dispositivos de toque */
@media (hover: none) and (pointer: coarse) {
    .test-option:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: none;
        box-shadow: none;
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .feature-item:hover {
        background: rgba(255, 255, 255, 0.05);
        transform: none;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .test-button:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.2);
        transform: none;
        box-shadow: none;
    }
    
    .header-advanced-menu-button:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.2);
        transform: none;
        box-shadow: none;
    }
    
    .back-button:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: none;
        box-shadow: none;
    }
    
    .test-again-button:hover {
        background: transparent;
        border-color: rgba(255, 255, 255, 0.3);
        transform: none;
        box-shadow: none;
    }
    
    .advanced-test-button:hover {
        background: transparent;
        border-color: rgba(255, 255, 255, 0.3);
        transform: none;
        box-shadow: none;
    }
    
    .streaming-platform:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        transform: none;
    }
}

/* Ajustes para leitores de tela */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ajustes para alto contraste */
@media (prefers-contrast: high) {
    body {
        background: #000;
    }
    
    body::before {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .test-button {
        border: 2px solid #fff;
        color: #fff;
        background: transparent;
    }
    
    .test-button:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .header-advanced-menu-button {
        border: 1px solid #fff;
        color: #fff;
        background: transparent;
    }
    
    .header-advanced-menu-button:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Ajustes para modo reduzido de movimento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .test-button::before,
    .header-advanced-menu-button::before {
        display: none;
    }
}

/* Ajustes para modo escuro */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #1a1a1a;
        --secondary-color: #2a2a2a;
        --accent-color: #3a3a3a;
        --text-primary: #ffffff;
        --text-secondary: #e2e8f0;
        --white: #ffffff;
        --background-overlay: rgba(0, 0, 0, 0.7);
    }
}

/* Ajustes para modo claro */
@media (prefers-color-scheme: light) {
    :root {
        --primary-color: #f0f0f0;
        --secondary-color: #e0e0e0;
        --accent-color: #d0d0d0;
        --text-primary: #333333;
        --text-secondary: #555555;
        --white: #ffffff;
        --background-overlay: rgba(0, 0, 0, 0.5);
    }
    
    body::before {
        background: var(--background-overlay);
    }
    
    .main-title,
    .chart-title,
    .result-value,
    .user-info-line span {
        color: var(--text-primary);
    }
    
    .subtitle,
    .result-label,
    .user-info-line {
        color: var(--text-secondary);
    }
    
    .legend-text {
        color: var(--text-secondary);
    }
}