body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 20px;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.balance {
    color: #333;
    font-size: 14px;
}

h1 {
    color: #333;
    margin: 0;
    font-size: 24px;
}

.swap-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.input-group {
    margin: 15px 0;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 16px;
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row input {
    flex: 1;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

input[readonly] {
    cursor: pointer;
    background-color: #f9f9f9;
}

.swap-icon {
    font-size: 24px;
    margin: 10px 0;
    color: #007bff;
}

.button-group {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 200px;
    font-size: 16px;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    background-color: #0056b3;
}

.slippage {
    margin: 15px 0;
    text-align: left;
}

.slippage select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#status {
    margin-top: 15px;
    color: #333;
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    box-sizing: border-box;
}

.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.token-item {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.token-item:hover {
    background-color: #f0f0f0;
}

#errorMessage {
    color: #d32f2f;
    margin: 10px 0;
    font-size: 14px;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.modal-buttons button {
    width: 120px;
}

/* Responsive Design for Mobile */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .wallet-info {
        align-items: center;
        margin-top: 10px;
    }

    .input-row {
        flex-direction: column;
        gap: 5px;
    }

    .input-row input {
        width: 100%;
    }

    button {
        width: 100%;
        max-width: 300px;
    }

    .modal-content {
        width: 90%;
        max-width: 300px;
    }

    h1 {
        font-size: 20px;
    }

    label {
        font-size: 14px;
    }

    .input-row input,
    .slippage select,
    .token-item,
    #status,
    #errorMessage {
        font-size: 14px;
    }

    .modal-buttons button {
        width: 100px;
        padding: 8px;
        font-size: 14px;
    }
}