/* Import Orbitron font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* Colors for close icon */
:root {
    --softorange: #F4A259;
    --tomatored: #F25C66;
    --mediumblu: #1E272D;
    --neon-green: rgba(38, 166, 154, 0.3);
}

/* Base settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #121212;
    color: #d1d4dc;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding: 10px;
    overflow-x: hidden;
}

/* Container */
.chart-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

/* Input card */
.Card {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.Card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.CardInner label {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #d1d4dc;
    display: block;
    margin-bottom: 10px;
}

.container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.Icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #2a2a2a;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.Icon svg {
    stroke: #657789;
    transition: stroke 0.3s ease;
}

.Icon:hover svg {
    stroke: #26a69a;
}

.InputContainer {
    flex: 1;
    min-width: 250px;
}

#mintAddress {
    width: 100%;
    padding: 12px 15px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #d1d4dc;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#mintAddress:focus {
    outline: none;
    border-color: #26a69a;
    box-shadow: 0 0 8px var(--neon-green);
}

#mintAddress::placeholder {
    color: #657789;
}

.btn-primary {
    background-color: #26a69a;
    border: none;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, padding-right 0.3s ease, width 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: #2cb9ac;
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary.loading {
    padding-right: 40px;
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-primary .ld {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-primary.loading .ld {
    display: inline-block;
}

/* Spinner rotation animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Price container */
.price-container {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin: 40px auto;
    padding-bottom: 20px;
    min-height: 200px;
    width: 100%;
    max-width: 960px;
    overflow: visible;
}

/* Central block (info, display, buttons) */
.price-center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin-right: 20px;
    margin-top: 20px;
}

/* Container for logo, name, and symbol */
.token-info {
    display: flex;
    align-items: center;
    background-color: #272e38;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 320px;
    position: relative;
}

.token-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 10px;
    object-fit: cover;
    display: none;
}

.token-logo[src] {
    display: block;
}

.token-details {
    display: flex;
    flex-direction: column;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #d1d4dc;
}

.token-details span {
    margin-bottom: 5px;
}

/* Close container */
.close-container {
    position: absolute;
    top: -30px;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    transition: transform 0.3s ease;
}

.close-container.show {
    display: block !important;
}

/* Left-to-right stripe */
.leftright {
    height: 2px;
    width: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    background-color: var(--tomatored);
    border-radius: 1px;
}

/* Right-to-left stripe */
.rightleft {
    height: 2px;
    width: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background-color: var(--tomatored);
    border-radius: 1px;
}

/* Hover effect */
.close-container:hover {
    transform: rotate(180deg);
}

/* Digital display styles */
#price-display {
    width: 100%;
    max-width: 320px;
    padding: 15px;
    position: relative;
    font-family: 'Orbitron', sans-serif;
    background-color: #272e38;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#price-display:after {
    content: '';
    position: absolute;
    width: 340px;
    height: 15px;
    border-radius: 100%;
    left: 50%;
    margin-left: -170px;
    bottom: -5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: -1;
}

#price-display .display {
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    position: relative;
    background-color: #0f1620;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08) inset, 0 1px 1px #2d3642;
}

#price-display .digits {
    display: flex;
    justify-content: center;
    align-items: center;
}

#price-display .digits div {
    text-align: left;
    position: relative;
    width: 24px;
    height: 40px;
    display: inline-block;
    margin: 0 3px;
}

#price-display .digits div span {
    opacity: 0;
    position: absolute;
    transition: 0.25s;
}

#price-display .digits div span:before,
#price-display .digits div span:after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 4px solid transparent;
}

#price-display .digits div span {
    background-color: #26a69a;
    border-color: #26a69a;
}

/* Dot styles */
#price-display .digits div.dots {
    width: 8px;
    display: inline-block;
    position: relative;
    height: 40px;
}

#price-display .digits div.dots:before {
    content: '';
    width: 6px;
    height: 6px;
    position: absolute;
    left: 1px;
    top: 28px;
    background-color: #26a69a;
    border-radius: 50%;
}

/* Digit styles */
#price-display .digits .d1 { height: 4px; width: 14px; top: 0; left: 5px; }
#price-display .digits .d1:before { border-width: 0 4px 4px 0; border-right-color: inherit; left: -4px; }
#price-display .digits .d1:after { border-width: 0 0 4px 4px; border-left-color: inherit; right: -4px; }

#price-display .digits .d2 { height: 4px; width: 14px; top: 18px; left: 5px; }
#price-display .digits .d2:before { border-width: 2px 3px 2px; border-right-color: inherit; left: -6px; }
#price-display .digits .d2:after { border-width: 2px 3px 2px; border-left-color: inherit; right: -6px; }

#price-display .digits .d3 { height: 4px; width: 14px; top: 36px; left: 5px; }
#price-display .digits .d3:before { border-width: 4px 4px 0 0; border-right-color: inherit; left: -4px; }
#price-display .digits .d3:after { border-width: 4px 0 0 4px; border-left-color: inherit; right: -4px; }

#price-display .digits .d4 { width: 4px; height: 10px; top: 5px; left: 0; }
#price-display .digits .d4:before { border-width: 0 4px 4px 0; border-bottom-color: inherit; top: -4px; }
#price-display .digits .d4:after { border-width: 0 0 4px 4px; border-left-color: inherit; bottom: -4px; }

#price-display .digits .d5 { width: 4px; height: 10px; top: 5px; right: 0; }
#price-display .digits .d5:before { border-width: 0 0 4px 4px; border-bottom-color: inherit; top: -4px; }
#price-display .digits .d5:after { border-width: 4px 0 0 4px; border-top-color: inherit; bottom: -4px; }

#price-display .digits .d6 { width: 4px; height: 10px; top: 23px; left: 0; }
#price-display .digits .d6:before { border-width: 0 4px 4px 0; border-bottom-color: inherit; top: -4px; }
#price-display .digits .d6:after { border-width: 0 0 4px 4px; border-left-color: inherit; bottom: -4px; }

#price-display .digits .d7 { width: 4px; height: 10px; top: 23px; right: 0; }
#price-display .digits .d7:before { border-width: 0 0 4px 4px; border-bottom-color: inherit; top: -4px; }
#price-display .digits .d7:after { border-width: 4px 0 0 4px; border-top-color: inherit; bottom: -4px; }

/* Digits 0-9 */
#price-display .digits div.zero .d1, #price-display .digits div.zero .d3, #price-display .digits div.zero .d4,
#price-display .digits div.zero .d5, #price-display .digits div.zero .d6, #price-display .digits div.zero .d7 {
    opacity: 1;
}

#price-display .digits div.one .d5, #price-display .digits div.one .d7 {
    opacity: 1;
}

#price-display .digits div.two .d1, #price-display .digits div.two .d5, #price-display .digits div.two .d2,
#price-display .digits div.two .d6, #price-display .digits div.two .d3 {
    opacity: 1;
}

#price-display .digits div.three .d1, #price-display .digits div.three .d5, #price-display .digits div.three .d2,
#price-display .digits div.three .d7, #price-display .digits div.three .d3 {
    opacity: 1;
}

#price-display .digits div.four .d5, #price-display .digits div.four .d2, #price-display .digits div.four .d4,
#price-display .digits div.four .d7 {
    opacity: 1;
}

#price-display .digits div.five .d1, #price-display .digits div.five .d2, #price-display .digits div.five .d4,
#price-display .digits div.five .d3, #price-display .digits div.five .d7 {
    opacity: 1;
}

#price-display .digits div.six .d1, #price-display .digits div.six .d2, #price-display .digits div.six .d4,
#price-display .digits div.six .d3, #price-display .digits div.six .d6, #price-display .digits div.six .d7 {
    opacity: 1;
}

#price-display .digits div.seven .d1, #price-display .digits div.seven .d5, #price-display .digits div.seven .d7 {
    opacity: 1;
}

#price-display .digits div.eight .d1, #price-display .digits div.eight .d2, #price-display .digits div.eight .d3,
#price-display .digits div.eight .d4, #price-display .digits div.eight .d5, #price-display .digits div.eight .d6,
#price-display .digits div.eight .d7 {
    opacity: 1;
}

#price-display .digits div.nine .d1, #price-display .digits div.nine .d2, #price-display .digits div.nine .d3,
#price-display .digits div.nine .d4, #price-display .digits div.nine .d5, #price-display .digits div.nine .d7 {
    opacity: 1;
}

/* DEXScreener chart styles */
.search-candles {
    width: 100%;
    max-width: 640px;
    height: 360px;
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin-left: 20px;
}

.search-candles iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Button container styles */
.search-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    justify-content: center;
}

.search-buy-btn.btn-primary {
    background-color: #26a69a;
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, padding-right 0.3s ease, width 0.3s ease;
}

.search-buy-btn.btn-primary:hover {
    background-color: #2cb9ac;
}

.search-buy-btn.btn-primary.loading {
    padding-right: 35px;
    opacity: 0.8;
    cursor: not-allowed;
}

.search-sell-btn.btn-primary {
    background-color: #d9534f;
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, padding-right 0.3s ease, width 0.3s ease;
}

.search-sell-btn.btn-primary:hover {
    background-color: #c9302c;
}

.search-sell-btn.btn-primary.loading {
    padding-right: 35px;
    opacity: 0.8;
    cursor: not-allowed;
}

/* Main settings container styles */
.trade-settings-container {
    position: absolute;
    top: -60px;
    left: 15px;
    display: flex;
    gap: 10px;
    z-index: 10;
    background-color: transparent;
    margin-bottom: 20px;
}

/* Styles for each setting field */
.setting {
    display: flex;
    flex-direction: column;
    width: 90px;
}

.setting label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: #d1d4dc;
    margin-bottom: 3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.setting input {
    padding: 6px 8px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #d1d4dc;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    box-shadow: 0 0 4px var(--neon-green);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

/* Remove spin buttons for input[type="number"] */
.setting input::-webkit-inner-spin-button,
.setting input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.setting input:focus {
    outline: none;
    border-color: #26a69a;
    box-shadow: 0 0 8px rgba(38, 166, 154, 0.5);
}

.setting input::placeholder {
    color: #657789;
}

/* Wallet button container styles */
.wallet-button-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Wallet generation button styles */
.generate-wallet-btn.btn-primary {
    background-color: #26a69a;
    border: none;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, padding-right 0.3s ease, width 0.3s ease;
}

.generate-wallet-btn.btn-primary:hover {
    background-color: #2cb9ac;
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.4);
}

.generate-wallet-btn.btn-primary:active {
    transform: scale(0.98);
}

.generate-wallet-btn.btn-primary.loading {
    padding-right: 40px;
    opacity: 0.8;
    cursor: not-allowed;
}

/* Wallet info styles */
.wallet-info {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    color: #d1d4dc;
}

/* Remove text-overflow for nested spans */
.wallet-info span {
    margin-bottom: 5px;
    white-space: nowrap;
    max-width: 200px;
}

/* Clickable wallet address styles */
.wallet-address-link {
    color: #ffeb3b;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.wallet-address-link:hover {
    color: #fff176;
    text-decoration: underline;
}

.wallet-address-link:visited {
    color: #ffeb3b;
}

/* Wallet address copy icon styles */
.wallet-address-copy {
    position: relative;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-image: url('https://img.icons8.com/ios-filled/50/ffffff/copy.png');
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    opacity: 0.7;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
    pointer-events: auto;
}

.wallet-address-copy:hover {
    opacity: 1;
}

.wallet-address-copy.copied {
    background-color: #26a69a;
    opacity: 1;
}

/* Toast message styles */
.copy-tooltip {
    position: absolute;
    background: #26a69a;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    z-index: 11;
    pointer-events: none;
    animation: fadeOut 1s ease forwards;
}

/* Fade-out animation */
@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Market cap and liquidity styles */
#token-marketcap,
#token-liquidity {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: #d1d4dc;
    margin-bottom: 5px;
}

#token-marketcap .value {
    color: #ffeb3b;
}

#token-liquidity .value {
    color: #26a69a;
}

/* Signature address styles */
.signature {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: #26a69a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: inline-block;
    transition: color 0.3s ease;
    text-decoration: none;
}

.signature:hover {
    color: #2cb9ac;
    text-decoration: underline;
}

/* Update styles for purchase-item */
.purchase-item .token-details .signature {
    font-size: 0.7rem;
    max-width: 120px;
}

/* Purchase list styles */
.purchases-list .purchase-item .token-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.purchases-list .purchase-item .growth-percent,
.purchases-list .purchase-item .profit-sol {
    font-size: 0.9rem;
}

.purchases-list .purchase-item .growth-percent.positive,
.purchases-list .purchase-item .profit-sol.positive {
    color: #26a69a;
}

.purchases-list .purchase-item .growth-percent.negative,
.purchases-list .purchase-item .profit-sol.negative {
    color: #d9534f;
}

/* Chart and logs container */
.chart-and-logs {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 860px;
}

/* Transaction logs block styles */
.transaction-logs {
    height: 360px;
    background-color: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    flex-direction: column;
}

/* Logs title */
.logs-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: #d1d4dc;
    padding: 10px;
    border-bottom: 1px solid #3a3a3a;
    text-align: center;
}

/* Logs list */
.logs-list {
    flex: 1;
    padding: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #d1d4dc;
}

/* Log entry styles */
.log-entry {
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-entry:hover {
    text-decoration: underline;
    cursor: pointer;
}

.log-entry.buy {
    color: #26a69a;
}

.log-entry.sell {
    color: #d9534f;
}

/* Log time styles */
.log-time {
    color: #888;
    margin-left: 4px;
}

.log-address {
    color: #ffffff;
}

.toast a {
    color: #00b7eb;
    text-decoration: none;
    white-space: nowrap;
}

.toast a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }

    /* Chart container */
    .chart-container {
        padding: 10px 0;
        margin: 0 auto;
        width: 100%;
        max-width: 360px; /* Adjusted for mobile */
    }

    /* Input card (mint search block) */
    .Card {
        max-width: 280px;
        margin: 15px auto; /* Centered with vertical margin */
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .CardInner label {
        font-size: 1rem;
        margin-bottom: 8px; /* Added margin below label */
    }

    .container {
        flex-direction: column; /* Vertical stacking */
        gap: 8px; /* Spacing between elements */
        margin-bottom: 10px; /* Margin below container */
    }

    .Icon {
        margin: 5px auto; /* Centered with vertical margin */
    }

    .InputContainer {
        min-width: 100%; /* Full width */
        margin: 5px 0; /* Vertical margin for input container */
    }

    #mintAddress {
        font-size: 0.8rem;
        padding: 8px 10px;
        margin: 5px 0; /* Margin around input */
    }

    .btn-primary {
        font-size: 0.6rem;
        padding: 6px 10px;
        width: 100%;
        max-width: 280px;
        margin: 8px auto; /* Centered with vertical margin */
        display: block; /* Ensure button is block-level for centering */
    }

    .btn-primary.loading {
        padding-right: 25px;
    }

    .btn-primary .ld {
        width: 10px;
        height: 10px;
        right: 5px;
    }

    /* Wallet button container */
    .wallet-button-container {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 280px;
        margin: 10px auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Wallet generation button */
    .generate-wallet-btn.btn-primary {
        width: 100%;
        max-width: 280px;
        font-size: 0.6rem;
        padding: 6px 10px;
        margin: 8px 0; /* Added margin */
    }

    /* Wallet info */
    .wallet-info {
        width: 100%;
        max-width: 280px;
        font-size: 0.6rem;
        margin-top: 8px; /* Added margin */
    }

    .wallet-info span {
        max-width: 100%;
        margin-bottom: 6px; /* Margin between wallet info lines */
    }

    .wallet-address-link {
        font-size: 0.6rem;
    }

    .wallet-address-copy {
        width: 10px;
        height: 10px;
        margin-left: 4px;
    }

    /* Trade settings container */
    .trade-settings-container {
        position: relative;
        top: 0;
        left: 0;
        display: flex;
        /* flex-direction: column; */ /* Stack vertically on mobile */
        width: 100%;
        max-width: 280px;
        padding: 0;
        background-color: transparent;
        margin: 10px auto; /* Centered with margin */
    }

    /* Setting inputs */
    .setting {
        width: 100%;
        max-width: 280px;
        margin: 5px 0; /* Margin between settings */
    }

    .setting label {
        font-size: 0.6rem;
        text-align: left;
        margin-bottom: 4px; /* Margin below label */
    }

    .setting input {
        font-size: 0.6rem;
        padding: 5px 6px;
        width: 100%;
        margin-bottom: 5px; /* Margin below input */
    }

    /* Price container */
    .price-container {
        flex-direction: column;
        align-items: center;
        margin: 15px auto;
        max-width: 280px;
    }

    /* Price center */
    .price-center {
        margin-right: 0;
        max-width: 280px;
    }

    /* Token info */
    .token-info {
        max-width: 280px;
        margin-bottom: 8px; /* Added margin */
    }

    /* Price display */
    #price-display {
        max-width: 280px;
        margin-bottom: 8px; /* Added margin */
    }

    /* Search buttons */
    .search-buttons {
        max-width: 280px;
        margin-bottom: 8px; /* Added margin */
    }

    /* Chart and logs */
    .chart-and-logs {
        flex-direction: column;
        gap: 10px;
        max-width: 280px;
        margin: 0 auto; /* Centered */
        align-items: center; /* Center children */
    }

    .search-candles {
        max-width: 280px;
        margin: 8px auto; /* Centered with margin */
        display: block; /* Ensure visibility if needed */
    }

    .transaction-logs {
        /* max-width: 280px; */
        /* height: 180px; */
        margin: 8px auto; /* Centered with margin */
        display: flex; /* Ensure visibility if needed */
    }

    /* Purchases list */
    .purchases-list {
        max-height: 120px;
        width: 100%;
        max-width: 280px;
        margin: 10px auto;
        padding: 6px;
        overflow-y: auto;
    }

    .purchase-item {
        font-size: 0.6rem;
        padding: 5px;
        margin-bottom: 6px; /* Added margin between items */
    }

    .purchase-item img {
        width: 18px;
        height: 18px;
    }

    .purchase-item .token-details .symbol {
        font-size: 0.6rem;
    }

    .purchase-item .token-details .amount,
    .purchase-item .token-details .value,
    .purchase-item .token-details .growth-percent {
        font-size: 0.55rem;
    }

    .purchase-item .purchase-buy-btn,
    .purchase-item .purchase-sell-btn {
        font-size: 0.6rem;
        padding: 4px 8px;
    }

    .purchase-item .purchase-buy-btn.loading,
    .purchase-item .purchase-sell-btn.loading {
        padding-right: 20px;
    }

    .purchase-item .purchase-buy-btn .ld,
    .purchase-item .purchase-sell-btn .ld {
        width: 8px;
        height: 8px;
        right: 5px;
        border: 1px solid #ffffff;
        border-top-color: transparent;
    }

    .token-spinner {
        width: 8px;
        height: 8px;
        border: 1px solid #d1d4dc;
        border-top-color: transparent;
    }
}

@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }

    /* Chart container */
    .chart-container {
        padding: 15px 0;
        margin: 0 auto;
        width: 100%;
        max-width: 600px; /* Suitable for tablets */
    }

    /* Input card (mint search block) */
    .Card {
        max-width: 360px; /* Slightly larger for tablets */
        margin: 15px auto; /* Centered with vertical margin */
        padding: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .CardInner label {
        font-size: 1.1rem;
        margin-bottom: 10px; /* Margin below label */
    }

    .container {
        flex-direction: column; /* Vertical stacking for compactness */
        gap: 8px; /* Spacing between elements */
        margin-bottom: 12px; /* Margin below container */
    }

    .Icon {
        margin: 6px auto; /* Centered with vertical margin */
    }

    .InputContainer {
        min-width: 100%; /* Full width */
        margin: 6px 0; /* Vertical margin for input container */
    }

    #mintAddress {
        font-size: 0.9rem; /* Fixed: Correct property */
        padding: 10px 12px;
        margin: 6px 0; /* Margin around input */
    }

    .btn-primary {
        font-size: 0.7rem;
        padding: 8px 15px;
        width: 100%;
        max-width: 360px;
        margin: 10px auto; /* Centered with vertical margin */
        display: block; /* Ensure button is block-level for centering */
    }

    .btn-primary.loading {
        padding-right: 30px;
    }

    .btn-primary .ld {
        width: 12px;
        height: 12px;
        right: 6px;
    }

    /* Wallet button container */
    .wallet-button-container {
        position: relative; /* Follow document flow */
        top: 0;
        left: 0;
        width: 100%;
        max-width: 360px;
        margin: 15px auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Wallet generation button */
    .generate-wallet-btn.btn-primary {
        width: 100%;
        max-width: 360px;
        font-size: 0.7rem;
        padding: 8px 15px;
        margin: 10px 0; /* Added margin */
    }

    /* Wallet info */
    .wallet-info {
        width: 100%;
        max-width: 360px;
        font-size: 0.7rem;
        margin-top: 10px; /* Added margin */
    }

    .wallet-info span {
        max-width: 100%;
        margin-bottom: 8px; /* Margin between wallet info lines */
    }

    .wallet-address-link {
        font-size: 0.7rem;
    }

    .wallet-address-copy {
        width: 12px;
        height: 12px;
        margin-left: 4px;
    }

    /* Trade settings container */
    .trade-settings-container {
        position: relative;
        top: 0;
        left: 0;
        display: flex;
        flex-wrap: wrap; /* Allow wrapping for better layout */
        width: 100%;
        max-width: 360px;
        padding: 0;
        background-color: transparent;
        margin: 15px auto; /* Centered with margin */
    }

    /* Setting inputs */
    .setting {
        width: 100px; /* Slightly wider for tablets */
        margin: 6px 0; /* Margin between settings */
    }

    .setting label {
        font-size: 0.7rem;
        text-align: left;
        margin-bottom: 5px; /* Margin below label */
    }

    .setting input {
        font-size: 0.7rem;
        padding: 6px 8px;
        width: 100%;
        margin-bottom: 6px; /* Margin below input */
    }

    /* Price container */
    .price-container {
        flex-direction: column;
        align-items: center;
        margin: 20px auto;
        max-width: 600px;
    }

    /* Price center */
    .price-center {
        margin-right: 0;
        max-width: 360px;
    }

    /* Token info */
    .token-info {
        max-width: 360px;
        margin-bottom: 10px; /* Added margin */
    }

    /* Price display */
    #price-display {
        max-width: 360px;
        margin-bottom: 10px; /* Added margin */
    }

    /* Search buttons */
    .search-buttons {
        max-width: 360px;
        margin-bottom: 10px; /* Added margin */
    }

    /* Chart and logs */
    .chart-and-logs {
        flex-direction: column;
        gap: 15px;
        max-width: 360px;
        margin: 0 auto; /* Centered */
        align-items: center; /* Center children */
    }

    .search-candles {
        max-width: 360px;
        margin: 10px auto; /* Centered with margin */
        display: block; /* Ensure visibility if needed */
    }

    .transaction-logs {
        /* max-width: 360px; */
        /* height: 200px; */
        margin: 10px auto; /* Centered with margin */
        display: flex; /* Ensure visibility if needed */
    }

    /* Purchases list */
    .purchases-list {
        max-height: 150px;
        width: 100%;
        max-width: 360px;
        margin: 15px auto;
        padding: 8px;
        overflow-y: auto;
    }

    .purchase-item {
        font-size: 0.7rem;
        padding: 6px;
        margin-bottom: 8px; /* Added margin between items */
    }

    .purchase-item img {
        width: 20px;
        height: 20px;
    }

    .purchase-item .token-details .symbol {
        font-size: 0.65rem;
    }

    .purchase-item .token-details .amount,
    .purchase-item .token-details .value,
    .purchase-item .token-details .growth-percent {
        font-size: 0.6rem;
    }

    .purchase-item .purchase-buy-btn,
    .purchase-item .purchase-sell-btn {
        font-size: 0.65rem;
        padding: 5px 10px;
    }

    .purchase-item .purchase-buy-btn.loading,
    .purchase-item .purchase-sell-btn.loading {
        padding-right: 25px;
    }

    .purchase-item .purchase-buy-btn .ld,
    .purchase-item .purchase-sell-btn .ld {
        width: 10px;
        height: 10px;
        right: 6px;
        border: 1.5px solid #ffffff;
        border-top-color: transparent;
    }

    .token-spinner {
        width: 10px;
        height: 10px;
        border: 1.5px solid #d1d4dc;
        border-top-color: transparent;
    }
}

