/* --- BASE STYLES & FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0052ff;
    --green: #24AD64;
    --red: #FF3B30;
    --muted: #8E8E93;
    --bg-grey: #F2F2F7;
    --text-black: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: var(--text-black);
    overflow-x: hidden;
}

/* --- SCREEN CONTAINERS --- */
.screen-container, .dashboard-container {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
}

.screen-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* --- HEADERS --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.page-header h1 {
    font-size: 18px;
    font-weight: 700;
}

.header-fixed-area {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    padding: 10px 16px 0;
}

.dash-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

/* --- INPUTS & SEARCH --- */
.search-bar {
    flex: 1;
    background: var(--bg-grey);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 15px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-left: 4px;
}

.field-box {
    background: var(--bg-grey);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    position: relative; /* Added to support absolute paste button */
}

.field-box input, .field-box textarea {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 16px;
    outline: none;
    font-weight: 500;
}

.phrase-box textarea {
    height: 100px;
    resize: none;
    padding-bottom: 30px; /* Space for paste button */
}

/* --- PASTE BUTTON STYLE --- */
.paste-text {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: #e0e0ff;
    color: var(--primary);
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    z-index: 5;
}

/* --- BALANCE SECTION --- */
.balance-section {
    text-align: center;
    padding: 10px 0 20px;
}

.wallet-label {
    background: var(--bg-grey);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

#main-balance {
    font-size: 44px;
    font-weight: 800;
    margin: 5px 0;
    letter-spacing: -1px;
}

.balance-percentage {
    color: var(--green);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

/* --- QUICK ACTIONS --- */
.quick-actions {
    display: flex;
    justify-content: space-around;
    margin: 10px 0 25px;
}

.action-item {
    text-align: center;
    flex: 1;
}

.icon-circle {
    width: 54px;
    height: 54px;
    background: var(--bg-grey);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 6px;
}

.action-item.active .icon-circle {
    background: var(--primary);
    color: #fff;
}

.action-item span {
    font-size: 13px;
    font-weight: 600;
}

/* --- TABS --- */
.tabs {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 0.5px solid #E5E5EA;
    padding: 0 16px;
}

.tab {
    padding-bottom: 12px;
    font-weight: 700;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
}

.tab.active {
    color: #000;
    border-bottom: 3px solid var(--primary);
}

.tab-icons {
    margin-left: auto;
    display: flex;
    gap: 15px;
    color: var(--muted);
    padding-bottom: 12px;
}

/* --- MARKET LIST & ASSETS --- */
.market-list {
    padding: 0 16px 120px; /* Space for bottom nav */
}

.asset-row {
    display: flex;
    align-items: center;
    padding: 14px 0;
}

.asset-row img {
    width: 44px;
    height: 44px;
    margin-right: 12px;
    border-radius: 50%;
}

.meta {
    flex: 1;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.name {
    font-weight: 700;
    font-size: 17px;
}

.network-tag {
    background: var(--bg-grey);
    color: var(--muted);
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: capitalize;
}

.price-row {
    font-size: 14px;
    color: #000;
    font-weight: 500;
}

.p-change {
    font-weight: 700;
    margin-left: 2px;
}

.p-change.up { color: var(--green); }
.p-change.down { color: var(--red); }

.bal {
    text-align: right;
}

.crypto-v {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 2px;
}

.fiat-v {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

/* --- FOOTERS & BUTTONS --- */
.sticky-footer {
    margin-top: auto;
    padding: 20px 0;
}

.btn-main {
    width: 100%;
    padding: 16px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-main.active {
    background: var(--primary);
    color: #fff;
}

.btn-main.disabled {
    background: #e0e0ff;
    color: var(--primary);
    opacity: 0.6;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 700;
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 430px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 10px 0 30px;
    border-top: 0.5px solid #ddd;
    z-index: 200;
}

.nav-icon {
    text-align: center;
    color: var(--muted);
    font-size: 10px;
    flex: 1;
}

.nav-icon.active {
    color: var(--primary);
}

.nav-icon i {
    font-size: 24px;
    display: block;
    margin-bottom: 4px;
}

.nav-fab i {
    background: var(--primary);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -15px;
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-end;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    max-width: 430px;
    margin: 0 auto;
}

.modal-handle {
    width: 40px;
    height: 5px;
    background: #ddd;
    border-radius: 10px;
    margin: 0 auto 20px;
}

.modal-options button {
    width: 100%;
    padding: 16px;
    background: var(--bg-grey);
    border: none;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- NEW MODAL ACTION STYLES --- */
.modal-close {
    width: 100%;
    padding: 14px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
    cursor: pointer;
    text-align: center;
}

.logout-btn {
    color: var(--red) !important;
}
/* --- ONBOARDING STYLES --- */
#onboarding-screen {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.onboarding-carousel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.slides-container {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    height: 70%;
}

.onboarding-slide {
    min-width: 100%;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ob-graphic {
    font-size: 80px;
    color: #0052ff;
    margin-bottom: 30px;
    background: #f0f5ff;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 40px;
}

.onboarding-slide h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #000;
}

.onboarding-slide p {
    font-size: 16px;
    color: #8E8E93;
    line-height: 1.5;
}

.ob-footer {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #E5E5EA;
    border-radius: 50%;
    transition: all 0.3s;
}

.dot.active {
    background: #0052ff;
    width: 20px;
    border-radius: 10px;
}