@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');

@media (max-width: 768px) { 
    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 { max-width: 100%; height: 50px; font-size: 20px; }
    .swap-details { width: 100%; padding: 10px; }
    .neon-card { max-width: 100%; }
    .neon-card-section { padding: 15px; }
    .neon-card-section input { font-size: 20px; }
    #tokenModal .modal-content, #swapDetailsModal .modal-content { width: 95%; padding: 15px; }
}

body { 
    font-family: 'Jura', sans-serif; 
    background-color: #0e0e10; 
    min-height: 100vh;
    overflow-x: hidden;
}
.neon-text { text-shadow: 0 0 5px #00f, 0 0 10px #00f, 0 0 20px #00f, 0 0 40px #0ff, 0 0 80px #0ff; }
.neon-outline { margin-top: 190px; color: white; text-shadow: 0 0 5px #00f, 0 0 10px #00f, 0 0 20px #00f, 0 0 40px #0ff, 0 0 80px #0ff; }
.neon-button { 
    text-shadow: 0 0 5px #00f, 0 0 10px rgb(216, 216, 230), 0 0 20px #00f, 0 0 40px #0ff, 0 0 80px #0ff; 
    margin-top: 20px; 
    background: rgba(86, 76, 151, 0.359); 
    box-shadow: 0px 4px 4px hsla(0, 1%, 82%, 0.524), 0 0 5px rgb(255, 255, 255), 0 0 10px rgb(139, 139, 157), 0 0 20px #00f, 0 0 40px rgb(0, 0, 0), 0 0 80px rgba(29, 36, 244, 0.216); 
    border-radius: 20px; 
    opacity: 0.9; 
    width: 100%; 
    max-width: 450px; 
    height: 60px; 
    position: relative; 
    cursor: pointer; 
    transition: all 0.2s ease;
    z-index: 10;
}
.neon-button:hover { opacity: 1; transform: translateY(-1px); }
.neon-button:active { transform: translateY(1px); }

.swap-arrows { 
    width: 32px; height: 32px; border-radius: 50%; background: #3b82f6; border: 4px solid #1e293b; 
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; 
    transition: all 0.2s ease; position: relative; margin: -16px auto;
}
.swap-arrows:hover { transform: rotate(180deg) scale(1.1); background: #2563eb; }
.swap-arrows svg { width: 16px; height: 16px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: relative; display: inline-block; width: 50px; height: 25px; background-color: #ccc; 
    border-radius: 25px; transition: background-color 0.3s; }
.slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 4px; bottom: 3.5px; 
    background-color: white; border-radius: 50%; transition: transform 0.3s; }
input:checked + .slider { background-color: #4CAF50; }
input:checked + .slider:before { transform: translateX(24px); }
.connect-button-text { font-size: 16px; color: white; }
.neon-button-text { 
    color: white; font-size: 24px; font-family: 'Jura', sans-serif; font-weight: 400; line-height: 30px; 
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.neon-card { 
    background: rgba(35, 34, 34, 0); box-shadow: 0 0 20px rgba(161, 161, 238, 0.884), 0 0 30px rgb(25, 64, 235); 
    border-radius: 20px; padding: 2px; overflow: hidden; width: 100%; max-width: 550px; z-index: 5;
}
.neon-card-inner { 
    background: rgba(21, 51, 94, 0.253); border-radius: 20px; padding: 20px; position: relative; 
    box-shadow: 0px 0px 0px rgba(69, 142, 219, 0); }
.neon-card-content { position: relative; z-index: 1; }
.neon-card-section { 
    background: rgba(0, 0, 0, 0.98); border-radius: 30px; outline: 1px rgba(168, 153, 231, 0.518) solid; 
    outline-offset: -1px; padding: 20px; margin-bottom: 10px; }
.neon-card-section:last-child { margin-bottom: 0; }
.neon-card-section input { 
    background: transparent; text-align: right; width: 100%; color: white; font-size: 24px; 
    font-family: 'Inter', sans-serif; font-weight: 400; line-height: 40px; border: none; outline: none; 
    padding: 0 10px; }
.neon-card-section .label { color: #E5E7EB; font-size: 20px; font-family: 'Inter', sans-serif; font-weight: 400; line-height: 30px; }
.token-selector { 
    background: #5070C9; border-radius: 9999px; outline: 2px #A99A9A solid; outline-offset: -2px; 
    backdrop-filter: blur(225px); padding: 6px 12px; color: white; font-size: 16px; font-family: 'Jura', sans-serif; 
    font-weight: 400; line-height: 30px; cursor: pointer; transition: all 0.2s ease; 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%;
}

#tokenModal, #swapDetailsModal { 
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); display: none; 
    justify-content: center; align-items: center; z-index: 1000; }
#tokenModal .modal-content, #swapDetailsModal .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; }
#tokenModal h2, #swapDetailsModal h2 { color: white; text-align: center; margin-bottom: 15px; }
#tokenSearch { 
    width: 100%; padding: 12px 15px; border: 2px solid #3b82f6; background: #1a1a1d; color: white; 
    border-radius: 10px; margin-bottom: 15px; font-size: 16px; }
#tokenList, #swapDetailsContent { flex-grow: 1; overflow-y: auto; }
.token-item { 
    display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #2d3748; cursor: pointer; 
    color: white; transition: background 0.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 { font-weight: bold; }
.token-name { color: #a0aec0; font-size: 14px; }
#closeModal, #closeSwapDetails, #confirmSwapButton { 
    width: 100%; padding: 12px; background: #3b82f6; color: white; border: none; border-radius: 10px; 
    cursor: pointer; font-weight: bold; text-align: center; margin-top: 15px; font-size: 16px; transition: background 0.2s; }
#closeModal:hover, #closeSwapDetails:hover, #confirmSwapButton:hover { background: #2563eb; }

.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; }

.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: spin 1s ease-in-out infinite; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.settings-button { background: transparent; border: none; color: #a0aec0; cursor: pointer; font-size: 18px; 
    margin-left: 10px; transition: color 0.2s; }
.settings-button:hover { color: white; }

.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; align-items: center; padding: 8px 0; cursor: pointer; }
.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: white; border-radius: 5px; }
.custom-slippage span { color: white; }

.swap-details {
    background: rgba(0, 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;
}
.swap-details-value {
    color: white;
}

.floating-token {
    display: flex;
    align-items: stretch;
    flex-basis: auto;
    box-sizing: border-box;
    min-height: 0px;
    min-width: 0px;
    flex-shrink: 0;
    flex-direction: column;
    transform-origin: center center;
    position: absolute;
    border-style: solid;
    transform: scale(1);
    border-width: 1px;
    opacity: 0.2;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.floating-token img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    cursor: pointer;
}
.floating-token:hover {
    transform: scale(1.2);
    opacity: 1;
    animation: ripple 0.6s linear;
}
.floating-token.clicked {
    animation: ripple 0.6s linear;
}
@keyframes ripple {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    100% { box-shadow: 0 0 0 30px rgba(59, 130, 246, 0); }
}
.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 .price {
    font-weight: bold;
}
.token-details .change-positive {
    color: #10B981;
    font-weight: bold;
}
.token-details .change-negative {
    color: #EF4444;
    font-weight: bold;
}
.floating-token:hover .token-details {
    display: block;
}