/* --- CSS Variables --- */
:root {
    --bg-color: #212130;
    --panel-bg: #27262c;
    --panel-inner-bg: #353244;
    --text-main: #ffffff;
    --text-muted: #a1a1a1;
    --primary-cyan: #1bd3b1;
    --primary-cyan-hover: #18bd9e;
    --pink-text: #ed4b9e;
    --purple-text: #a881fc;
    --border-radius: 24px;
    --inner-radius: 16px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Navbar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: #1e1d26;
    border-bottom: 1px solid #383241;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
}

.logo img {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 24px;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-links a.active {
    color: var(--purple-text);
}

.badge-new {
    background: var(--primary-cyan); 
    color: black; 
    font-size: 10px; 
    padding: 2px 4px; 
    border-radius: 4px;
    margin-left: 4px;
}

.search-bar {
    background-color: #373542;
    border-radius: 16px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 120px;
    cursor: pointer;
}

.icon-btn {
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    background: none;
    border: none;
}

.connect-btn {
    background-color: var(--primary-cyan);
    color: #000;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.connect-btn:hover {
    background-color: var(--primary-cyan-hover);
}

/* --- Main Content Area --- */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    flex-grow: 1;
}

/* --- Hot Assets Bar --- */
.hot-assets {
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.hot-assets-title {
    color: var(--pink-text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.show-more {
    cursor: pointer;
}

.hot-assets-list {
    background-color: var(--panel-bg);
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 12px;
}

.asset-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asset-header {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--text-main);
}

.asset-price {
    color: var(--text-main);
}

.text-red { color: var(--pink-text); }
.text-green { color: var(--primary-cyan); }

/* --- Swap Panel --- */
.swap-panel {
    background-color: var(--panel-bg);
    width: 100%;
    max-width: 480px;
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 8px;
}

.tab-group {
    display: flex;
    gap: 16px;
    font-weight: 600;
    font-size: 16px;
}

.tab {
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 0;
}

.tab.active {
    color: var(--text-main);
}

.tab.active span {
    background-color: #373542;
    padding: 4px 12px;
    border-radius: 12px;
}

.chart-icon {
    color: white; 
    cursor: pointer;
}

/* Input Containers */
.input-container {
    background-color: var(--panel-inner-bg);
    border-radius: var(--inner-radius);
    padding: 16px;
    margin-bottom: 4px;
    position: relative;
}

.input-header {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.input-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.currency-select {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    padding: 4px 8px 4px 4px;
    border-radius: 16px;
    cursor: pointer;
}

.currency-select:hover {
    background-color: rgba(255,255,255,0.05);
}

.currency-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
}

.icon-sm {
    width: 16px; 
    height: 16px; 
    font-size: 10px;
}

.bnb-icon { background-color: #F3BA2F; color: black; }
.cake-icon { background-color: #633001; color: #d1884f; }
.safu-icon { background: #fff; color: black; }
.qqob-icon { background: #eee; color: black; }

.currency-text {
    display: flex;
    flex-direction: column;
}

.currency-ticker {
    font-weight: 600;
    font-size: 16px;
}

.currency-chain {
    font-size: 10px;
    color: var(--text-muted);
}

.amount-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    text-align: right;
    outline: none;
    width: 100%;
    max-width: 200px;
}

.amount-input::placeholder {
    color: var(--text-muted);
}

.usd-value {
    text-align: right;
    color: var(--text-muted);
    font-size: 12px;
}

/* Swap Arrow */
.swap-arrow-container {
    display: flex;
    justify-content: center;
    margin: -10px 0;
    position: relative;
    z-index: 2;
}

.swap-arrow-btn {
    background-color: var(--panel-inner-bg);
    border: 3px solid var(--panel-bg);
    color: var(--primary-cyan);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
}

.swap-arrow-btn:hover {
    transform: scale(1.1);
}

/* Settings */
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
    padding: 0 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.slippage-btn {
    background-color: rgba(27, 211, 177, 0.1);
    color: var(--primary-cyan);
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* Main Action Button */
.action-btn {
    width: 100%;
    background-color: var(--primary-cyan);
    color: #000;
    font-weight: 600;
    font-size: 16px;
    padding: 16px;
    border-radius: var(--inner-radius);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.action-btn:hover {
    background-color: var(--primary-cyan-hover);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links, .search-bar { display: none; }
    .hot-assets, .swap-panel, .hot-assets-list { 
        max-width: 95%; 
        margin-left: auto; 
        margin-right: auto; 
    }
}