* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #0a0a0a;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    height: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.page {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 80px;
}

.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 50px 20px;
    text-align: center;
}

.page-content h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 40px;
}

.icon-box {
    height: 100px;
    margin-bottom: 20px;
}

.icon-box img {
    height: 100%;
    object-fit: contain;
}

.buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-primary, .btn-secondary {
    padding: 16px;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary {
    background: #00ff88;
    color: #0a0a0a;
}

.btn-primary:hover {
    background: #00dd7a;
}

.btn-secondary {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
}

.btn-secondary:hover {
    background: #2a2a2a;
}

.terms {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}

.terms a {
    color: #00ff88;
    text-decoration: none;
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: fadeInOut 0.5s ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    height: 70px;
    background: #ffffff00;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
}

.nav-group {
    display: flex;
    gap: 10px;
    background: #1a1a1a;
    border-radius: 50px;
    padding: 1px;
    align-items: center;
}

.nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: all 0.3s;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.nav-icon img {
    width: 24px;
    height: 24px;
}

.nav-icon.active {
    background: #2a2a2a;
    color: #0a0a0a;
}

.nav-icon:hover {
    color: #fff;
}

.nav-search {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
}

.nav-search svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.nav-search:hover {
    background: #2a2a2a;
}

/* Wallet Menu */
.wallet-menu {
    position: absolute;
    top: 60px;
    left: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    z-index: 50;
    min-width: 220px;
}

.wallet-menu-content {
    padding: 12px;
}

.wallet-menu-header {
    font-size: 12px;
    color: #888;
    padding: 8px 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.wallet-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.wallet-menu-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.wallet-menu-item:hover {
    background: #2a2a2a;
}

.wallet-menu-item.active {
    background: #00ff88;
    color: #0a0a0a;
}

.wallet-menu-add {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: #00ff88;
    border: none;
    border-radius: 8px;
    color: #0a0a0a;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.wallet-menu-add:hover {
    background: #00dd7a;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 14px 16px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    margin-bottom: 12px;
}

.form-input::placeholder {
    color: #666;
}

.form-input:focus {
    outline: none;
    border-color: #00ff88;
    background: #252525;
}

/* PIN Input */
.pin-input-group {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.pin-field {
    width: 250px;
    padding: 20px;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 12px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    color: #fff;
}

.pin-field:focus {
    outline: none;
    border-color: #00ff88;
    background: #252525;
}

.pin-hint {
    color: #888;
    font-size: 13px;
    margin: 0;
}

/* Error Message */
.error-message {
    background: #ff6b6b22;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
}

/* Setup Page */
.setup-center {
    justify-content: flex-start;
    padding-top: 60px;
}

.skip-btn {
    position: fixed;
    top: 12px;
    right: 20px;
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
}

.subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    padding: 12px 16px;
    border-radius: 8px;
    width: 100%;
    margin-top: 15px;
    font-size: 14px;
}

.info-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Dashboard */
.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #1a1a1a;
    position: relative;
}

.wallet-badge-box {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
}

.wallet-badge {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.header-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

.promo {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 12px 16px;
    margin: 16px 20px;
    border-radius: 12px;
}

.promo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.promo-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: left;
}

.promo-subtitle {
    font-size: 12px;
    color: #888;
    text-align: left;
}

.section {
    padding: 20px;
}

.section h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.arrow {
    margin-left: 8px;
    color: #888;
    font-size: 16px;
}

.action-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: 1fr !important;
    width: 100%;
    gap: 12px;
    margin-bottom: 16px;
}

.action-item {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 2;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    cursor: pointer;
}

.action-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.action-labels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
}

.action-labels span {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.crypto-card {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 16px;
    border-radius: 12px;
}

.crypto-header {
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.crypto-header img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.crypto-label h3 {
    font-size: 14px;
    font-weight: 600;
}

.leverage {
    font-size: 11px;
    color: #888;
}

.crypto-volume {
    font-size: 12px;
    color: #888;
}

/* Markets Page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #1a1a1a;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.search-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-btn svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

.tabs {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #1a1a1a;
    overflow-x: auto;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 8px 16px;
    border-radius: 20px;
    color: #888;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}

.tab svg {
    width: 16px;
    height: 16px;
    stroke: #888;
}

.tab.active {
    background: #00ff88;
    color: #0a0a0a;
    border-color: #00ff88;
}

.tab.active svg {
    stroke: #0a0a0a;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mini-card {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 12px;
    border-radius: 12px;
}

.mini-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-header img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.mini-header span {
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-price {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mini-change {
    font-size: 12px;
}

.mini-change.red {
    color: #ff6b6b;
}

.chips {
    display: flex;
    gap: 8px;
    padding: 0 20px 12px;
    overflow-x: auto;
}

.chip {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 6px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

.chip svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.filters {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    overflow-x: auto;
}

.filter {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 8px 12px;
    border-radius: 8px;
    color: #888;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

.market-list {
    padding: 0 20px;
}

.market-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #1a1a1a;
}

.market-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.market-info img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.market-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.market-info p {
    font-size: 12px;
    color: #888;
}

.market-price {
    text-align: right;
}

.market-price div:first-child {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.green {
    color: #00ff88;
}

.red {
    color: #ff6b6b;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
}

.search-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #1a1a1a;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.search-input::placeholder {
    color: #666;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #1a1a1a;
}

.search-result-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.search-result-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.search-result-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-result-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.search-result-price {
    font-size: 12px;
    color: #888;
}

.search-result-change {
    font-size: 13px;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.no-results {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* Receive Page */
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 20px;
    background: #1a1a1a;
    padding: 10px 14px;
    border-radius: 12px;
}

.search-box svg {
    width: 18px;
    height: 18px;
    stroke: #888;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: #666;
}

.back-btn {
    width: 36px;
    height: 36px;
    font-weight: 600;
    color: #ffffff;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.back-btn svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

.back-btn text {
    font: 14px;
    color: #FFFFFF;
    font-weight:600;
}

.crypto-tabs {
    display: flex;
    gap: 3px;
    padding: 12px 20px;
    
}

.crypto-tab {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: #1a1a1a;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 12px;
}

.crypto-tab.active {
    border-color: #00ff88;
    color: #ffffff;
}

.crypto-tab img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.crypto-section {
    padding: 0 20px 20px;
}

.label {
    font-size: 13px;
    color: #666;
    margin: 16px 0 12px;
    font-weight: 500;
}

.crypto-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crypto-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 12px;
    border-radius: 12px;
}

.row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.row-left img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.row-left h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.row-left p {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.row-left code {
    font-size: 11px;
    color: #666;
    font-family: monospace;
}

.row-right {
    display: flex;
    gap: 8px;
}

.row-right button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0a0a0a;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.row-right button svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    stroke: #fff;
}

/* Responsive */
@media (max-width: 480px) {
    .page-content {
        padding: 40px 16px;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .crypto-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .action-grid {
        grid-template-columns: 1fr;
    }

    .mini-grid {
        grid-template-columns: 1fr;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}