/* Importazione dei font */
@import url('https://fonts.googleapis.com/css2?family=Jura:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Effetti neon per il testo */
.neon-text, .neon-outline {
    text-shadow: 
        0 0 5px #00f,
        0 0 10px #00f,
        0 0 20px #00f,
        0 0 40px #0ff,
        0 0 80px #0ff;
}

/* Stile per il testo dello slogan aggiuntivo */
.neon-text-subtle {
    text-shadow: 
        0 0 2px #00f,
        0 0 5px #00f,
        0 0 10px #0ff;
}

/* Stile per i pulsanti e gli elementi interattivi */
.neon-button, .swap-arrows {
    transition: .2s;
    position: relative;
    cursor: pointer;
}

/* Posizionamento relativo per alcuni elementi */
.neon-button, .slider, .swap-arrows, .switch {
    position: relative;
}

/* Font Jura per il corpo e alcuni elementi */
body, .neon-button-text, .token-selector {
    font-family: Jura, sans-serif;
}

/* Stile per testi specifici */
.neon-button-text, .neon-card-section .label, .token-selector {
    font-weight: 400;
    line-height: 30px;
}

/* Animazione ripple per i token fluttuanti */
.floating-token:hover, .floating-token.clicked {
    animation: .6s linear ripple;
}

/* Regole responsive per schermi piccoli */
@media (max-width: 768px) {
    .neon-button, .neon-card {
        max-width: 100%;
    }
    nav .text-blue-500 {
        margin-top: -220px;
    }
    .swap-container {
        padding: 0 15px;
    }
    .token-selector {
        padding: 4px 8px !important;
        font-size: 14px !important;
        min-width: 100px !important;
    }
    .neon-button, .neon-card-section input {
        font-size: 20px;
    }
    .neon-button {
        height: 50px;
    }
    .swap-details {
        width: 100%;
        padding: 10px;
    }
    .neon-card-section {
        padding: 15px;
    }
    #swapDetailsModal .modal-content, #tokenModal .modal-content {
        width: 95%;
        padding: 15px;
    }
}

/* Stile del corpo della pagina */
body {
    background-color: #0e0e10;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Stile per il testo dello slogan */
.neon-outline {
    margin-top: 190px;
    color: #fff;
}

/* Stile per il pulsante di swap */
.neon-button {
    text-shadow: 
        0 0 5px #00f,
        0 0 10px #d8d8e6,
        0 0 20px #00f,
        0 0 40px #0ff,
        0 0 80px #0ff;
    margin-top: 20px;
    background: rgba(86, 76, 151, .359);
    box-shadow: 
        0 4px 4px hsla(0, 1%, 82%, .524),
        0 0 5px #fff,
        0 0 10px #8b8b9d,
        0 0 20px #00f,
        0 0 40px #000,
        0 0 80px rgba(29, 36, 244, .216);
    border-radius: 20px;
    opacity: .9;
    width: 100%;
    max-width: 450px;
    height: 60px;
    z-index: 10;
}

.neon-button:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.neon-button:active {
    transform: translateY(1px);
}

/* Stile per il pulsante di inversione token */
.swap-arrows {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3b82f6;
    border: 4px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin: -16px auto;
}

.swap-arrows:hover {
    transform: rotate(180deg) scale(1.1);
    background: #2563eb;
}

.swap-arrows svg {
    width: 16px;
    height: 16px;
}

/* Stile per l'interruttore di connessione */
.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    display: inline-block;
    width: 50px;
    height: 25px;
    background-color: #ccc;
    border-radius: 25px;
    transition: background-color .3s;
}

.slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 4px;
    bottom: 3.5px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform .3s;
}

input:checked + .slider {
    background-color: #4caf50;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Stile per il testo del pulsante di connessione */
.connect-button-text {
    font-size: 16px;
    color: #fff;
}

/* Stile per il testo del pulsante di swap */
.neon-button-text {
    color: #fff;
    font-size: 24px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Stile per il contenitore dello swap */
.neon-card {
    background: rgba(35, 34, 34, 0);
    box-shadow: 
        0 0 20px rgba(161, 161, 238, .884),
        0 0 30px #1940eb;
    border-radius: 20px;
    padding: 2px;
    overflow: hidden;
    width: 100%;
    max-width: 550px;
    z-index: 5;
}

.neon-card-inner {
    background: rgba(21, 51, 94, .253);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 0 0 rgba(69, 142, 219, 0);
}

.neon-card-content {
    position: relative;
    z-index: 1;
}

/* Stile per le sezioni interne del contenitore dello swap */
.neon-card-section {
    background: rgba(0, 0, 0, .98);
    border-radius: 30px;
    outline: rgba(168, 153, 231, .518) solid 1px;
    outline-offset: -1px;
    padding: 20px;
    margin-bottom: 10px;
}

.neon-card-section:last-child {
    margin-bottom: 0;
}

.neon-card-section input {
    background: 0 0;
    text-align: right;
    width: 100%;
    color: #fff;
    font-size: 24px;
    font-family: Inter, sans-serif;
    font-weight: 400;
    line-height: 40px;
    border: none;
    outline: 0;
    padding: 0 10px;
}

/* Stile per le etichette "You pay" e "You receive" */
.neon-card-section .label {
    color: #e5e7eb;
    font-size: 20px;
    font-family: Jura, sans-serif;
}

/* Stile per il selettore di token */
.token-selector {
    background: #5070c9;
    border-radius: 9999px;
    outline: #A99A9A solid 2px;
    outline-offset: -2px;
    backdrop-filter: blur(225px);
    padding: 6px 12px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: .2s;
    display: flex;
    align-items: center;
    min-width: 140px;
    height: 40px;
    justify-content: center;
}

.token-selector:hover {
    background: #3a5bbf;
}

.token-selector img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 50%;
}

/* Stile per i modal */
#swapDetailsModal, #tokenModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#swapDetailsModal .modal-content, #tokenModal .modal-content {
    background: #0e0e10;
    padding: 20px;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid #3b82f6;
    display: flex;
    flex-direction: column;
}

#swapDetailsModal h2, #tokenModal h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 15px;
}

/* Stile per il campo di ricerca nel modal dei token */
#tokenSearch {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #3b82f6;
    background: #1a1a1d;
    color: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 16px;
}

/* Stile per il contenuto dei modal */
#swapDetailsContent, #tokenList {
    flex-grow: 1;
    overflow-y: auto;
}

/* Stile per gli elementi dei modal */
.slippage-option, .token-item {
    align-items: center;
    cursor: pointer;
}

.token-item {
    display: flex;
    padding: 12px;
    border-bottom: 1px solid #2d3748;
    color: #fff;
    transition: background .2s;
}

.token-item:hover {
    background: #1e293b;
}

.token-item img {
    width: 30px;
    height: 30px;
    margin-right: 12px;
    border-radius: 50%;
}

.token-info {
    display: flex;
    flex-direction: column;
}

.token-symbol, .token-details .price {
    font-weight: 700;
}

.token-name {
    color: #a0aec0;
    font-size: 14px;
}

/* Stile per i pulsanti dei modal */
#closeModal, #closeSwapDetails, #confirmSwapButton {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    transition: background .2s;
}

#closeModal:hover, #closeSwapDetails:hover, #confirmSwapButton:hover {
    background: #2563eb;
}

/* Stile per l'indicatore di stato della connessione */
.connection-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 8px;
    display: inline-block;
}

.connection-status.connected {
    background-color: #10b981;
    box-shadow: 0 0 5px #10b981;
}

.connection-status.disconnected {
    background-color: #ef4444;
    box-shadow: 0 0 5px #ef4444;
}

.connection-status.connecting {
    background-color: #f59e0b;
    box-shadow: 0 0 5px #f59e0b;
}

/* Animazione per lo spinner di caricamento */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: 1s ease-in-out infinite spin;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Stile per il pulsante delle impostazioni */
.settings-button {
    background: 0 0;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
    transition: color .2s;
}

.settings-button:hover, .swap-details-value, .custom-slippage span {
    color: #fff;
}

/* Stile per il menu delle impostazioni di slippage */
.slippage-settings {
    position: absolute;
    right: 0;
    top: 40px;
    background: #1a1a1d;
    border: 1px solid #3b82f6;
    border-radius: 10px;
    padding: 15px;
    z-index: 10;
    width: 200px;
    display: none;
}

.slippage-option {
    display: flex;
    padding: 8px 0;
}

.slippage-option input {
    margin-right: 10px;
}

.custom-slippage {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.custom-slippage input {
    width: 60px;
    padding: 5px;
    margin-right: 5px;
    background: #2d3748;
    border: 1px solid #3b82f6;
    color: #fff;
    border-radius: 5px;
}

/* Stile per i dettagli dello swap */
.swap-details {
    background: rgba(0, 0, 0, .7);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #3b82f6;
    width: 100%;
    max-width: 550px;
    z-index: 5;
}

.swap-details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.swap-details-label {
    color: #a0aec0;
}

/* Stile per i token fluttuanti */
.floating-token {
    display: flex;
    align-items: stretch;
    flex-basis: auto;
    box-sizing: border-box;
    min-height: 0;
    min-width: 0;
    flex-shrink: 0;
    flex-direction: column;
    transform-origin: center center;
    position: absolute;
    border-style: solid;
    transform: scale(1);
    border-width: 1px;
    opacity: .2;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    z-index: 1;
    transition: transform .2s, opacity .2s;
}

.floating-token img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    cursor: pointer;
}

.floating-token:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* Animazione ripple per i token fluttuanti */
@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, .5);
    }
    100% {
        box-shadow: 0 0 0 30px rgba(59, 130, 246, 0);
    }
}

/* Stile per i dettagli dei token fluttuanti */
.token-details {
    display: none;
    position: absolute;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-family: Inter, sans-serif;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.token-details .change-positive {
    color: #10b981;
    font-weight: 700;
}

.token-details .change-negative {
    color: #ef4444;
    font-weight: 700;
}

.floating-token:hover .token-details {
    display: block;
}
/* Platforms Section */
.platforms-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.uniswap-card {
    width: 300px;
    height: 400px;
    background: #1a1a2e;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
    margin: 0 -40px; /* Intentional overlap on desktop */
}

.uniswap-card:hover {
    z-index: 10; /* Bring to foreground on hover */
    transform: perspective(1000px) translateY(-10px) scale(1.05); /* Lift and slight scale */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.uniswap-card-inner {
    padding: 20px;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.uniswap-card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.platform-phone-image, .platform-airdrop-image, .explore-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.uniswap-card:hover .platform-phone-image,
.uniswap-card:hover .platform-airdrop-image,
.uniswap-card:hover .explore-image {
    transform: scale(1.1) translateZ(10px);
    box-shadow: 0 0 20px rgba(59, 130, 246, 1);
}

.explore-graph-container, .airdrop-container {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.uniswap-card h3 {
    font-family: Jura, sans-serif;
    font-weight: 700;
    color: #00d4ff;
    font-size: 24px;
    transition: text-shadow 0.3s ease;
}

.uniswap-card:hover h3 {
    text-shadow: 0 0 10px #00f, 0 0 20px #00f, 0 0 30px #0ff;
}

.uniswap-card p {
    font-family: Inter, sans-serif;
    font-size: 16px;
    color: #d1d5db;
    transition: color 0.3s ease;
}

.uniswap-card:hover p {
    color: #e6e8eb;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1000;
    font-size: 14px;
    pointer-events: none;
}

/* Responsive Rules for Platforms Section */
@media (max-width: 768px) {
    .platforms-section .flex {
        flex-direction: column;
        align-items: center;
    }
    .uniswap-card {
        width: 100%;
        max-width: 350px;
        height: 400px;
        margin: 20px 0; /* Remove overlap on mobile */
    }
    .platform-phone-image, .platform-airdrop-image, .explore-image, .explore-graph-container, .airdrop-container {
        height: 200px;
    }
}