body {
    font-family: 'JetBrains Mono', monospace;
    margin: 0;
    padding: 0;
    background-color: #111;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}
header, footer {
    text-align: center;
    padding: 20px;
}
main {
    padding: 20px;
    text-align: left;
    width: 60%;
    margin: 0 auto;
}
h1, h2, h3 {
    margin: 0;
    padding: 10px 0;
}
p {
    line-height: 1.6;
    color: #ccc;
}
.red {
    color: #d82934;
}
.orange-proxy {
    color: #FFA500;
}
.purple-tor {
    color: #7D4698;
}
.blue-relay {
    color: #00A2FF;
}
.subtle {
    color: #4e4e4e;
}
footer p {
    text-align: right;
    margin-right: 100px;
}
a.highlight {
    text-decoration: none;
}

.ip-info {
    position: relative;
}

.ip-clickable {
    cursor: pointer;
    transition: opacity 0.3s ease;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s ease, opacity 0.3s ease;
}

.ip-clickable:hover {
    text-decoration-color: currentColor;
}

.flag-clickable {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.flag-clickable:hover {
    opacity: 0.7;
}

.isp-info {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 5px;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    z-index: 1000;
}

.isp-info.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.isp-info:before {
    display: none;
}

.ip-box {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #666;
}

.separator {
    height: 1px;
    background-color: #333;
    margin: 10px 0;
}

.connection-type {
    text-align: center;
    margin: 5px 0;
    padding: 5px 0;
}

.location-info {
    margin: 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #666666;
}

.isp-details {
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    display: block;
    line-height: 1.4;
}

.map-container {
    margin-top: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.map-container iframe {
    border-radius: 5px;
}

@-webkit-keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

.loading-dots::after {
    content: '.';
    display: inline-block;
    -webkit-animation: ellipsis 1.5s infinite;
    animation: ellipsis 1.5s infinite;
}

.domain-com {
    position: relative;
    display: inline-block;
    transition: color 0.3s;
}

.domain-com::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    z-index: -1;
    opacity: 0;
}

@keyframes colorSwipe {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        left: 0;
        opacity: 0.5;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

.domain-com.red::before,
.domain-com.blue-relay::before,
.domain-com.orange-proxy::before,
.domain-com.purple-tor::before {
    animation: colorSwipe 0.8s ease-in-out forwards;
}

/* Aseguramos que los colores base se mantengan correctamente */
.domain-com.red { color: #d82934; }
.domain-com.blue-relay { color: #00A2FF; }
.domain-com.orange-proxy { color: #FFA500; }
.domain-com.purple-tor { color: #7D4698; }

/* Estilo para la imagen en la página principal */
#ip .ip-info > img {
    vertical-align: middle;
    margin-left: 5px;
    position: relative;
    top: -2px; /* Ajuste específico para la página principal */
}

/* Estilo para la imagen en el cuadro de información */
.location-info img {
    vertical-align: middle;
    margin-left: 5px;
    position: relative;
    top: -1px; /* Ajuste específico para el cuadro de información */
}

/* Feedback discreto al copiar IP */
.copy-feedback {
    display: inline-block;
    color: #00ff00;
    font-size: 0.85em;
    margin-left: 8px;
    opacity: 0;
    animation: fadeInOut 1.5s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% { 
        opacity: 0;
        transform: translateY(0);
    }
    20% { 
        opacity: 1;
        transform: translateY(0);
    }
    80% { 
        opacity: 1;
        transform: translateY(0);
    }
    100% { 
        opacity: 0;
        transform: translateY(-5px);
    }
}