* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f4c75 0%, #3282b8 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

/* Menu Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-item a:hover,
.nav-item a.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.main-content {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-left: 20px;
    padding-right: 20px;
}

.page {
    display: none;
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 500px;
    color: #fff;
    text-align: center;
    margin: 0 auto;
}

.dashboard-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    margin: 20px auto;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    height: 300px;
}

.chart-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.metric-value {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.metric-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.metric-trend {
    font-size: 0.8rem;
    margin-top: 5px;
}

.trend-up {
    color: #4CAF50;
}

.trend-down {
    color: #f44336;
}

.trend-neutral {
    color: #FF9800;
}

h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.speed-display {
    margin-bottom: 40px;
}

.main-speed {
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.speed-unit {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.test-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 30px;
    min-height: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.latency-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.latency-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.latency-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.latency-button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border: none;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.latency-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.latency-button:disabled {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.latency-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.latency-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.latency-server {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.latency-time {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.latency-status {
    font-size: 0.7rem;
    margin-top: 3px;
}

.status-good {
    color: #4CAF50;
}

.status-fair {
    color: #FF9800;
}

.status-poor {
    color: #f44336;
}

.server-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s ease;
        gap: 20px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-container {
        height: 250px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 20px;
        margin: 10px;
    }

    .dashboard-container {
        padding: 20px;
        margin: 10px;
    }

    .main-speed {
        font-size: 3rem;
    }

    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .latency-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.stat-value {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
}

.stat-unit {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.start-button {
    background: linear-gradient(45deg, #00d4aa, #00a085);
    border: none;
    color: white;
    padding: 18px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(238, 90, 111, 0.3);
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(238, 90, 111, 0.4);
}

.start-button:disabled {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.footer {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.ip-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ip-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.ip-value {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}
/*Estilo para políticas */



    /* Estilos del texto Inicio*/

    h1 {
      text-align: center;
      font-size: 2.2rem;
      margin-bottom: 20px;
      color: #ffffff;
    }
    h2 {
      margin-top: 25px;
      font-size: 1.5rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.3);
      padding-bottom: 5px;
    }
    p {
      margin: 12px 0;
    }
    ul {
      margin: 12px 0 12px 25px;
    }
    a {
      color: #ffe082;
      text-decoration: none;
    }
    a:hover {
      text-decoration: underline;
    }

    /* Estilos del texto Fin*/

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

       

        .main-content {
            padding-top: 100px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding-left: 20px;
            padding-right: 20px;
        }


       .containerC {
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(12px);
      border-radius: 20px;
      max-width: 900px;
      width: 100%;
      padding: 80px;
      color: #fff;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
      line-height: 1.6;
      place-items: center;
    }



/* Estilos para la vista de Contacto*/
         
        form {
            
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        input, textarea {
            
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 10px;
            outline: none;
            font-size: 1rem;
        }

         textarea {
            resize: vertical;
            min-height: 120px;
          }

        label {
            
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        input[type="checkbox"] {
            width: 16px;
            height: 16px;
        }

        button {
            background: #ffe082;
            color: #333;
            border: none;
            border-radius: 12px;
            padding: 12px;
            font-size: 1rem;
            cursor: pointer;
            transition: 0.3s;
        }
        button:hover {
      background: #ffca28;
    }
    .note {
      font-size: 0.8rem;
      color: #ddd;
    }

    /*Estilo de mensaje de error*/

    .msg {
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: bold;
    color: #fff;
    opacity: 0.9;
    transition: opacity 0.5s ease-in-out;
}
.msg.success { background-color: #28a745; } /* Verde */
.msg.error   { background-color: #dc3545; } /* Rojo */

/* Ocultar automáticamente después de 4s */
.msg {
    animation: fadeOut 4s forwards;
}
@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

/* para que la imagen sea responsive */
img {
  max-width: 100%;
  height: auto;
  display: block; /* evita espacios raros debajo */
}

