:root {
    --background: #000000;
    --foreground: #ffffff;
    --muted: #666;
    --border: #333;
    --primary: #00ffb7;
    --primary-hover: #33ffc7;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
}

.navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: var(--primary);
}

/* Modal Content */
.modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    margin: 6rem auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #fff;
}

/* Wallet Options */
.wallet-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--foreground);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.wallet-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 255, 183, 0.15);
}

.wallet-btn img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

/* Forms */
.wallet-forms {
    margin-top: 1.5rem;
    display: none;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-forms.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 0.75rem;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--foreground);
    border-bottom: 2px solid var(--primary);
}

.tab-content form {
    display: none;
}

.tab-content form.active {
    display: block;
}

.tab-content textarea,
.tab-content input {
    width: 100%;
    padding: 1.25rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--foreground);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.tab-content textarea:focus,
.tab-content input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 2px rgba(0, 255, 183, 0.1);
}

.tab-content textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--background);
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .wallet-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .wallet-btn {
        padding: 1rem;
    }

    .wallet-btn img {
        width: 24px;
        height: 24px;
    }

    .tabs {
        gap: 0.25rem;
    }

    .tab-btn {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .nav-left {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--background);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .token-filters {
        margin: 4rem 0 1rem;
    }

    .filter-buttons {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .search-bar {
        max-width: 100%;
        margin-top: 0.5rem;
    }

    .token-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .token-header,
    .token-row {
        min-width: 1000px;
    }

    .show-more {
        display: block;
        width: 100%;
        padding: 0.5rem;
        margin-top: 1rem;
        background: none;
        border: none;
        color: var(--muted);
        cursor: pointer;
    }

    .show-more:hover {
        color: var(--foreground);
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }
}

/* Token Filters */
.token-filters {
    margin: 6rem 0 2rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: #222;
    border: 1px solid var(--border);
    color: var(--foreground);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--yellow);
}

.filter-btn.active {
    background-color: var(--primary);
}

.filter-btn.king {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: var(--yellow);
}

.search-bar {
    position: relative;
    max-width: 20rem;
}

.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background-color: rgba(34, 34, 34, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--foreground);
}

/* Token List */
.token-list {
    margin-top: 1rem;
}

.token-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.token-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.token-row:hover {
    border-color: rgba(255, 215, 0, 0.3);
    background-color: rgba(255, 215, 0, 0.1);
}

.token-row.highlight {
    background-color: rgba(255, 215, 0, 0.15);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 100;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}


.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    color: var(--muted);
}

.show-more {
    display: block;
    width: 100%;
    padding: 0.5rem;
    margin-top: 1rem;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
}

.show-more:hover {
    color: var(--foreground);
}

/* Add styles for modal backdrop */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 90;
}

/* Update modal content z-index and backdrop */
.modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    margin: 6rem auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 100;
    backdrop-filter: blur(12px);
}

/* Error Popup */
.error-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 110;
    align-items: center;
    justify-content: center;
}

.error-popup.show {
    display: flex;
}

.error-content {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    margin: 1rem;
    animation: popup 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-content p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

@keyframes popup {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Button States */
.btn.connecting {
    position: relative;
    pointer-events: none;
    background-color: var(--primary-hover);
}

.btn.connecting::after {
    content: '';
    position: absolute;
    right: 1rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--background);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}