:root {
    --bg-dark: #050810;
    --bg-card: #111625;
    --bg-input: #1c2438;
    --primary: #d4af37;
    --primary-hover: #b5952f;
    --secondary: #f0c440;
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --border: #2a3650;
    --success: #31d0aa;
    --danger: #ed4b9e;
    --warning: #ffb237;
    --shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.5);
    --card-radius: 24px;

    --font-main: 'Kanit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% -20%, #2a2010, #050810);
    color: var(--text-main);
    min-height: 100vh;
}

/* Hide Global Footer to preserve full-screen layout */
#footer-container {
    display: none !important;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    cursor: pointer;
}

.logo-img {
    width: 32px;
    height: 32px;
}
/* Beta badge */
.beta-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid var(--border);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 800;
    margin-left: 8px;
    letter-spacing: 0.03em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.nav-links li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links li:hover,
.nav-links li.active {
    color: var(--text-main);
}

.nav-links li.active {
    position: relative;
}

.nav-links li.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    border-radius: 4px 4px 0 0;
}

/* Nav Right Elements */
.price-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.price-pill img {
    width: 24px;
    height: 24px;
}

.lang-globe,
.settings-gear {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.lang-globe:hover,
.settings-gear:hover {
    transform: scale(1.1);
    color: var(--text-main);
}

.network-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.network-select img {
    width: 20px;
    height: 20px;
}

.btn-connect {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 16px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: 0px 2px 0px 0px #8f7625;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-connect:hover {
    background-color: var(--primary-hover);
}

.btn-connect:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Hero Section */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    padding: 4rem 2rem;
    min-height: calc(100vh - 64px);
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 500px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 600;
}

.chain-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.chain-icons img {
    width: 32px;
    height: 32px;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s;
}

.chain-icons img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Mini Dashboard */
.mini-dashboard {
    background-color: rgba(39, 38, 44, 0.5);
    padding: 1.5rem;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
}

.mini-dashboard h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.balance-display {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.gas-display {
    font-size: 0.9rem;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Swap Card */
.swap-container {
    flex: 1;
    max-width: 400px;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0px 4px 0px 0px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.swap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.swap-settings i {
    cursor: pointer;
    margin-left: 1rem;
    transition: color 0.2s;
}

.swap-settings i:hover {
    color: var(--primary);
}

.token-input-group {
    background-color: var(--bg-dark);
    /* Inner input bg */
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}
 .quick-amounts { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
 .qa-btn { background-color: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 0.3rem 0.6rem; border-radius: 12px; font-weight: 600; }
 .qa-btn:hover { background-color: rgba(31,199,212,0.1); }
 #percent-slider { width: 100%; margin-top: 0.5rem; }

.label-row {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.token-select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.token-select img {
    width: 24px;
    height: 24px;
}

.token-input-group input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    text-align: right;
    width: 150px;
    font-family: var(--font-main);
    font-weight: 600;
}

.token-input-group input:focus {
    outline: none;
}

.balance-label {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.swap-divider {
    display: flex;
    justify-content: center;
    margin: -12px 0;
    position: relative;
    z-index: 10;
}

.swap-divider i {
    background-color: var(--bg-input);
    color: var(--primary);
    padding: 0.5rem;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    cursor: pointer;
    transition: transform 0.2s;
}

.swap-divider i:hover {
    transform: rotate(180deg);
}

.swap-details {
    margin: 1.5rem 0;
    padding: 0 0.5rem;
}
 .slippage-panel { margin-top: 0.5rem; background-color: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; }
 .slippage-panel.hidden { display: none; }
 .slippage-options { display: flex; gap: 0.5rem; align-items: center; }
 .slippage-btn { background-color: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 0.3rem 0.6rem; border-radius: 12px; }
 .slippage-btn:hover { background-color: rgba(31,199,212,0.1); }

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: 0px 2px 0px 0px #8f7625;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Utilities */
.hidden {
    display: none !important;
}

.hidden-section {
    display: none;
}

/* Chart Overlay */
.chart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(5px);
}

.chart-card {
    width: 80%;
    max-width: 800px;
    height: 500px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.chart-header i {
    cursor: pointer;
    font-size: 1.5rem;
}

/* Other Sections (Earn, NFT) */
.section-header {
    text-align: center;
    margin: 3rem 0;
}

/* --- Swap layout fixes --- */
.input-row {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.input-row .quick-amounts {
    flex-basis: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.input-row #percent-slider {
    flex-basis: 100%;
}

.quick-amounts .qa-btn {
    white-space: nowrap;
}

.section-header h2 {
    color: var(--secondary);
    font-size: 2.5rem;
}

.pools-grid,
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.pool-card,
.nft-card {
    background-color: var(--bg-card);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.pool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pool-icon {
    width: 48px;
    height: 48px;
}

.apy-badge {
    background-color: rgba(31, 199, 212, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pool-stats {
    margin-bottom: 1.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.pool-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pool-actions input {
    background-color: var(--bg-input);
    border: none;
    padding: 0.8rem;
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-main);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: rgba(31, 199, 212, 0.1);
}

/* NFT Specific */
.nft-image {
    width: 100%;
    height: 250px;
    border-radius: 16px;
    margin-bottom: 1rem;
    object-fit: cover;
}

.nft-tabs,
.earn-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 600;
}

.highlight {
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: 0px 2px 0px 0px #8f7625;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Utilities */
.hidden {
    display: none !important;
}

.hidden-section {
    display: none;
}

/* Chart Overlay */
.chart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(5px);
}

.chart-card {
    width: 80%;
    max-width: 800px;
    height: 500px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.chart-header i {
    cursor: pointer;
    font-size: 1.5rem;
}

/* Other Sections (Earn, NFT) */
.section-header {
    text-align: center;
    margin: 3rem 0;
}

.section-header h2 {
    color: var(--secondary);
    font-size: 2.5rem;
}

.pools-grid,
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.pool-card,
.nft-card {
    background-color: var(--bg-card);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.pool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pool-icon {
    width: 48px;
    height: 48px;
}

.apy-badge {
    background-color: rgba(31, 199, 212, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pool-stats {
    margin-bottom: 1.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.pool-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pool-actions input {
    background-color: var(--bg-input);
    border: none;
    padding: 0.8rem;
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-main);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: rgba(31, 199, 212, 0.1);
}

/* NFT Specific */
.nft-image {
    width: 100%;
    height: 250px;
    border-radius: 16px;
    margin-bottom: 1rem;
    object-fit: cover;
}

.nft-tabs,
.earn-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Portfolio Table */
.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.portfolio-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.portfolio-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-list { list-style: none; display: grid; gap: 0.5rem; }
.history-item { display: grid; grid-template-columns: 1fr auto auto; gap: 0.5rem; align-items: center; }
.history-type { font-weight: 600; }
.history-amount { color: var(--secondary); }
.history-date { color: var(--text-muted); }
.history-filters { display: flex; gap: 0.5rem; align-items: center; margin: 0.5rem 0; }
.history-filters input, .history-filters select { background-color: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); padding: 0.4rem 0.6rem; border-radius: 8px; }

.asset-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.asset-icon {
    width: 32px !important;
    /* Force small size */
    height: 32px !important;
    border-radius: 50%;
}

.asset-name {
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

.asset-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.value-main {
    font-weight: 600;
    color: var(--text-main);
}

.value-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.swap-card { position: relative; }
.token-select-menu { position: absolute; background-color: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; display: none; gap: 0.5rem; }
.token-select-menu.hidden { display: none; }
.token-select-menu .token-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.5rem; cursor: pointer; }
.token-select-menu .token-option img { width: 20px; height: 20px; }
.token-select-menu .token-option:hover { background-color: var(--bg-input); }
.slippage-panel { margin-top: 0.5rem; background-color: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; }
.slippage-panel.hidden { display: none; }
.slippage-options { display: flex; gap: 0.5rem; align-items: center; }
.slippage-btn { background-color: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 0.3rem 0.6rem; border-radius: 12px; }
.slippage-btn:hover { background-color: rgba(31,199,212,0.1); }
/* Remove global header offset for this page */
body {
    padding-top: 0 !important;
}
