:root {
    --primary-color: #0066ff;
    --secondary-color: #001233;
    --background-light: #f5f7ff;
    --background-dark: #0a192f;
    --text-light: #000000;
    --text-dark: #fff;
    --card-light: rgba(255, 255, 255, 0.9);
    --card-dark: rgba(17, 34, 64, 0.9);
    --gradient-light: radial-gradient(circle, rgba(183,206,255,1) 0%, rgba(255,255,255,1) 100%);
    --gradient-dark: radial-gradient(circle, rgba(93,0,255,1) 0%, rgba(0,0,0,1) 88%, rgba(0,0,0,1) 100%, rgba(255,255,255,1) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    transition: all 0.3s ease;
    padding: 2rem;
    background: var(--gradient-dark);
    color: var(--text-dark);
   
}

body.dark-mode {
    background: var(--gradient-dark);
    color: var(--text-dark);
}

body.light-mode {
    background: var(--gradient-light);
    color: var(--text-light);
}

.glass-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

h1.light-mode {
    background: rgb(255, 255, 255);
}

.logo-img {
    height: clamp(4rem, 8vw, 8rem);
    vertical-align: middle;
    object-fit: contain;
    content: url('media/logo_white.png');
}

body.light-mode .logo-img {
    content: url('media/logo_dark.png');
}

.search-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 20px;
    background: transparent;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}


input {
    width: 60%;
    max-width: 800px;
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: clamp(0.875rem, 2vw, 1rem);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Agregamos los estilos para el placeholder */
input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Para navegadores webkit (Chrome, Safari, etc) */
input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Para Firefox */
input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Para Internet Explorer */
input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.light-mode input {
    background: rgba(255, 255, 255, 0.195);
    backdrop-filter: blur(20px);
    color: rgb(255, 255, 255);
    
}

.buttons-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 500px;
}

.button-wrap {
    flex: 1;
    min-width: 200px;
}

button {
    position: relative;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

button .bg {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    transition: all 0.3s ease;
}

button .shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

button:hover .shine {
    opacity: 1;
    transform: translate(25%, 25%);
}

button .glow {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: radial-gradient(circle at center, var(--primary-color) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

button:hover .glow {
    opacity: 0.3;
}

button .wave {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    animation: wave 2s infinite linear;
    pointer-events: none;
}

@keyframes wave {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

button .wrap-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

.results-container {
    background: rgba(0, 0, 0, 0);
    padding: 2rem;
    border-radius: 20px;
    margin-top: 2rem;
    width: 100%;
    max-width: 1200px;
}

.light-mode .results-container {
    background: rgba(137, 43, 226, 0);
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 1rem;
    border-radius: 50%;
    background: transparent;
    color: var(--text-dark);
}

.light-mode .theme-toggle {
    background: none;
    color: var(--text-light);
}

.animation-container {
    position: static;
    transform: none;
    margin: 2rem auto;
    background: transparent;
    padding: 0;
    width: 100%;
    max-width: 300px;
    display: none;
}

.animation-container img {
    width: 100%;
    height: auto;
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

.result-item {
    margin: 1rem 0;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
}

.light-mode .result-item {
    border-bottom: 1px solid rgba(0, 102, 255, 0.1);
    color: var(--text-light);
}

.ip-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.ip-title.search-result {
    color: white;
}

.error {
    color: #ff3366;
    font-weight: bold;
}

.light-mode .logo-img {
    content: url('media/logo_black.png');
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    animation: slideUp 0.5s ease-out;
}

@media (min-width: 769px) {
    /* Agregamos el overlay con el degradado solo para PC en modo claro */
    body.light-mode::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.552) 8%, rgba(11,29,61,0) 100%);
        pointer-events: none;
        z-index: 0;
    }

    /* Aseguramos que el contenido esté por encima del overlay */
    .container {
        position: relative;
        z-index: 1;
    }

    .search-container {
        width: 100%;
        max-width: 900px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0;
        margin: 0 auto;
        position: relative;
    }

    input {
        width: 60%;
        margin-right: -25px;
    }

    .button-wrap {
        width: auto;
        min-width: 150px;
        z-index: 2;
    }

    .animation-container {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: calc(100% + 3rem);
        width: 100%;
        max-width: 500px;
        margin: 0;
        display: none;
    }

    .animation-container img {
        width: 100%;
        max-width: 250px;
        height: auto;
        margin: 0 auto;
        display: block;
        margin-top: -70px;
    }

    .results-container {
        margin-top: 25px;
    }

    body.light-mode h1 {
        background: linear-gradient(90deg, rgb(0, 0, 0) 38%, rgb(0, 0, 0) 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }

    body.dark-mode h1 {
        background: white;
        -webkit-background-clip: text;
        background-clip: text;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 1.5rem;
    }

    .search-container {
        flex-direction: column;
        padding: 1rem;
    }

    input {
        width: 100%;
    }

    .button-wrap {
        width: 100%;
    }

    .animation-container {
        max-width: 200px;
    }

    .animation-container img {
        max-width: 3000px;
    }

    body.light-mode {
        background: linear-gradient(180deg, rgb(226, 229, 255) 0%, rgba(251,247,255,0.026855810683648507) 100%);
    }

    h1 {
        background: linear-gradient(90deg, #ffffff 0%, #ffffff 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }

    body.light-mode h1 {
        background: black;
        -webkit-background-clip: text;
        background-clip: text;
    }

    .ip-title {
        color: white;
    }

    body.light-mode .ip-title {
        color: black;
    }
}

@media (max-width: 480px) {

    body.light-mode .logo-img {
        content: url('media/logo_dark.png');
    }
    .light-mode {
        background: linear-gradient(180deg, rgba(32,30,93,1) 0%, rgba(251,247,255,0.026855810683648507) 100%);
    }
    h1 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .logo-img {
        height: clamp(3rem, 6vw, 4rem);
    }

    .button-wrap {
        min-width: 100%;
    }
}