/* Reset básico e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Estilo do corpo da página */
body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: white;
}

/* Container principal */
.container {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

/* Cabeçalho */
header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #fdbb2d;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Grupo de entrada de dados */
.input-group {
    display: flex;
    margin: 20px 0;
}

.input-group input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px 0 0 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.input-group button {
    padding: 15px 25px;
    border: none;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(to right, #4776E6, #8E54E9);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-group button:hover {
    background: linear-gradient(to right, #3A60C0, #7A48C7);
}

/* Área de resultados */
.results {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Indicador de status */
.status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-fast {
    background-color: #4CAF50;
    box-shadow: 0 0 10px #4CAF50;
}

.status-medium {
    background-color: #FFC107;
    box-shadow: 0 0 10px #FFC107;
}

.status-slow {
    background-color: #F44336;
    box-shadow: 0 0 10px #F44336;
}

/* Valor do ping */
.ping-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Verdict (resultado) */
.verdict {
    font-size: 1.5rem;
    margin: 15px 0;
    font-weight: bold;
}

.fast {
    color: #4CAF50;
}

.medium {
    color: #FFC107;
}

.slow {
    color: #F44336;
}

/* Histórico */
.history {
    margin-top: 30px;
}

.history h3 {
    text-align: center;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    border-radius: 10px;
    align-items: center;
    transition: transform 0.2s;
}

.history-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}

.history-url {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.history-ping {
    font-weight: bold;
    margin: 0 10px;
}

/* Loading (carregamento) */
.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.loader {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid #4776E6;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Caixa de informação */
.info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    font-size: 0.9rem;
    text-align: center;
}

/* Rodapé */
footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.developer {
    font-weight: bold;
    color: #fdbb2d;
    font-size: 1.1rem;
}

.institution {
    font-style: italic;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #fdbb2d;
}

/* Media queries para responsividade */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        border-radius: 10px;
        margin-bottom: 10px;
    }
    
    .input-group button {
        border-radius: 10px;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .history-status {
        align-self: flex-end;
    }
}