/* Importamos las fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Chewy&display=swap');

/* General */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Fredoka One', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #FFFFFF;
}

/* Topbar */
.topbar {
    background-color: #A5F35B;
    color: #333333;
    padding: 10px 10px;
    font-size: calc(0.7em + 0.3vw);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.topbar p {
    margin: 0;
    word-break: break-word;
    font-size: calc(0.8em + 0.2vw);
    text-align: left;
    flex: 1;
    overflow-wrap: break-word;
    white-space: normal;
}

.topbar-social {
    display: flex;
    gap: 8px;
    align-items: center;
}

.topbar-social a {
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #333333;
}

.topbar-social img {
    width: 22px;
    height: 22px;
    transition: transform 0.2s, filter 0.2s;
}

.topbar-social img:hover {
    transform: scale(1.2);
    filter: brightness(1.5);
}

/* Estilo del enlace del contrato */
.contract-link {
    color: #333333;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: calc(0.7em + 0.3vw);
    line-height: 1.5;
}

.contract-link:hover {
    color: #5BC4F5;
    transform: scale(1.05);
}

/* Barra de Navegación Sticky */
.navbar-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #333;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 2%;
    width: 100%;
    font-size: calc(1em + 0.5vw);
    box-sizing: border-box;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar-wrapper.scrolled {
    background-color: #222;
}

.navbar-wrapper.scrolled .navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-logo {
    margin-left: 5%;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.navbar-logo img {
    height: 70px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.navbar-logo:hover img {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
    justify-content: flex-end;
    flex-grow: 1;
    margin-right: 10%;
}

.nav-links li {
    transition: transform 0.3s ease;
}

.nav-links li:hover {
    transform: scale(1.1);
}

.nav-links li a {
    color: #A5F35B;
    text-decoration: none;
    font-weight: bold;
    font-size: calc(1em + 0.2vw);
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links li a:hover {
    color: #5BC4F5;
}

/* Menú hamburguesa */
.menu-icon {
    display: none;
    width: 30px;
    height: 21px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.menu-icon:hover {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .navbar {
        justify-content: space-between;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background-color: #333;
        position: absolute;
        width: 100%;
        top: 100%;
        left: 0;
        padding: 20px 0;
        text-align: center;
        z-index: 999;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.show {
        display: flex;
    }

    .menu-icon {
        display: block;
        font-size: 1.5em;
        cursor: pointer;
        color: #A5F35B;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links li a {
        font-size: calc(1em + 0.5vw);
        color: #A5F35B;
    }

    .nav-links li a:hover {
        color: #5BC4F5;
    }
}

/* Footer */
.footer {
    padding: 25px;
    background-color: #000;
    text-align: center;
    font-size: calc(0.8em + 0.5vw);
    color: #FFFFFF;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer a {
    color: #A5F35B;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #5BC4F5;
}

/* Estilos para la sección de compra de tokens */
.main-content {
    padding: 60px 20px;
    min-height: calc(100vh - 200px);
}

.token-purchase-section {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.token-purchase-section h1 {
    color: #A5F35B;
    font-family: 'Chewy', cursive;
    font-size: calc(1.8em + 1vw);
    margin-bottom: 30px;
    text-align: center;
}

.token-purchase-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#wallet-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    gap: 10px;
}

.wallet-address {
    font-size: 0.9em;
    background-color: rgba(165, 243, 91, 0.1);
    color: #A5F35B;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

.disconnect-button {
    font-size: 0.8em;
    padding: 8px 12px;
    background-color: rgba(255, 99, 71, 0.2);
    color: tomato;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.disconnect-button:hover {
    background-color: rgba(255, 99, 71, 0.3);
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.input-group label {
    color: #FFFFFF;
    font-size: calc(1em + 0.2vw);
    font-family: 'Fredoka One', sans-serif;
    text-align: center;
}

.input-group input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #A5F35B;
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: calc(0.9em + 0.2vw);
    width: 100%;
    max-width: 300px;
    text-align: center;
}

.button {
    padding: 15px 30px;
    background-color: #A5F35B;
    color: #1e1e1e;
    border: none;
    border-radius: 30px;
    font-size: calc(0.9em + 0.3vw);
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.button:hover {
    background-color: #8bc34a;
    transform: scale(1.05);
}

.button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.status, .error {
    text-align: center;
    font-size: calc(0.9em + 0.2vw);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    width: 100%;
    max-width: 300px;
}

.status {
    background-color: rgba(165, 243, 91, 0.2);
    color: #A5F35B;
}

.error {
    background-color: rgba(255, 99, 71, 0.2);
    color: tomato;
}

/* Estilos para la barra de progreso */
.progress-container {
    width: 100%;
    max-width: 300px;
    margin-top: 20px;
}

.progress-label {
    color: #FFFFFF;
    font-size: calc(0.8em + 0.2vw);
    margin-bottom: 5px;
    text-align: center;
}

.progress-bar-wrapper {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 20px;
    background-color: #A5F35B;
    transition: width 0.5s ease;
}

/* Estilos para los enlaces de transacción */
.transaction-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.transaction-link {
    color: #A5F35B;
    text-decoration: none;
    font-size: calc(0.8em + 0.2vw);
    transition: color 0.3s ease;
}

.transaction-link:hover {
    color: #8bc34a;
    text-decoration: underline;
}

/* Estilos para el marcador de oferta */
.price-highlight {
    background: linear-gradient(135deg, #A5F35B, #5BC4F5);
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
    width: 100%;
    box-sizing: border-box;
}

.price-highlight-content {
    max-width: 800px;
    margin: 0 auto;
}

.price-highlight h2 {
    color: #1e1e1e;
    font-size: 2em;
    margin-bottom: 10px;
}

.price-highlight .price {
    font-size: 1.5em;
    font-weight: bold;
    color: #1e1e1e;
}

.price-highlight .warning {
    color: #ff4500;
    font-weight: bold;
    margin: 15px 0;
    font-size: 1.2em;
}

.price-highlight .cta {
    font-size: 1.5em;
    font-weight: bold;
    color: #1e1e1e;
    margin-top: 15px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .topbar {
        flex-wrap: nowrap;
        align-items: center;
        padding: 10px;
    }

    .topbar .contract-link {
        font-size: 10px !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        text-align: left;
        line-height: 1.2;
    }

    .topbar-social {
        margin-top: 0;
        justify-content: flex-end;
        align-items: center;
    }

    .topbar-social img {
        width: 18px;
        height: 18px;
    }

    .navbar {
        justify-content: space-between;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background-color: #333;
        position: absolute;
        width: 100%;
        top: 100%;
        left: 0;
        padding: 20px 0;
        text-align: center;
        z-index: 999;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.show {
        display: flex;
    }

    .menu-icon {
        display: block;
        font-size: 1.5em;
        cursor: pointer;
        color: #A5F35B;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links li a {
        font-size: calc(1em + 0.5vw);
        color: #A5F35B;
    }

    .nav-links li a:hover {
        color: #5BC4F5;
    }

    .price-highlight h2 {
        font-size: 1.5em;
    }
    
    .price-highlight .price,
    .price-highlight .cta {
        font-size: 1.2em;
    }
    
    .price-highlight .warning {
        font-size: 1em;
    }
}