/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== Theme CSS variables (overridable by creator) ========== */
:root {
    --of-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --of-font-size-base: 1rem;
}
body.theme-dark {
    --of-primary: #3b82f6;
    --of-primary-dark: #2563eb;
    --of-text: #e2e2e8;
    --of-text-muted: rgba(255, 255, 255, 0.75);
    --of-box-bg: rgba(26, 26, 36, 0.95);
    --of-box-border: rgba(255, 255, 255, 0.12);
}

/* ========== Dark theme (default) ========== */
body.theme-dark {
    font-family: var(--of-font-family);
    font-size: var(--of-font-size-base);
    background: #0d0d14;
    background-image: linear-gradient(160deg, #0a0a12 0%, #0f0f1a 40%, #141422 100%);
    min-height: 100vh;
    color: var(--of-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: var(--of-font-family);
    font-size: var(--of-font-size-base);
    background: linear-gradient(160deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

#app {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* Login / Admin standalone pages */
.desopage-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.desopage-login-content {
    text-align: center;
    max-width: 360px;
}
.desopage-login-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--of-text, #fff);
    margin-bottom: 8px;
}
.desopage-login-content p {
    font-size: 0.95rem;
    color: var(--of-text-muted, rgba(255,255,255,0.75));
    margin-bottom: 24px;
}
.desopage-login-content .btn-connect {
    margin-bottom: 24px;
}
.desopage-login-content .login-back-link {
    font-size: 0.9rem;
    color: var(--of-text-muted, rgba(255,255,255,0.7));
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.desopage-login-content .login-back-link:hover {
    color: var(--of-text, #fff);
}

/* Login/admin standalone pages */
.desopage-login-standalone {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.login-standalone-content {
    text-align: center;
    max-width: 360px;
}
.login-standalone-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--of-text-muted, rgba(255,255,255,0.7));
    text-decoration: none;
    margin-bottom: 32px;
}
.login-standalone-back:hover { color: var(--of-text, #fff); }
.login-standalone-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--of-text, #fff);
    margin-bottom: 12px;
}
.login-standalone-hint {
    font-size: 0.95rem;
    color: var(--of-text-muted, rgba(255,255,255,0.75));
    margin-bottom: 28px;
}

/* ========== DeSoPage template ========== */
.desopage-app .desopage-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    text-align: center;
}

.desopage-onepage .desopage-hero {
    min-height: auto;
    padding: 32px 20px 28px;
}

.desopage-hero .creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto 16px;
    display: block;
}

.desopage-onepage .when-logged-out {
    text-align: center;
}

.desopage-onepage .when-logged-out .desopage-cta {
    display: inline-flex;
}
.desopage-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 48px;
    align-items: flex-start;
}
.desopage-onepage .desopage-main {
    max-width: 560px;
    margin: 0;
    flex: 1 1 400px;
    min-width: 0;
    padding: 0 0 48px;
}
.desopage-modules-column {
    width: 100%;
    max-width: 680px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.desopage-modules-column.has-top8 {
    max-width: 800px;
}
#module-top8.desopage-module {
    width: 100%;
}
.modules-feed-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}
.modules-feed-row .desopage-module {
    flex: 1;
    min-width: 0;
}
.modules-feed-row .desopage-module:only-child {
    flex: 1 1 100%;
    max-width: 100%;
}
@media (max-width: 900px) {
    .modules-feed-row {
        flex-direction: column;
    }
}
.desopage-module {
    background: var(--of-box-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--of-box-border, rgba(255,255,255,0.12));
    border-radius: 16px;
    padding: 20px;
}
.desopage-module .module-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--of-text, #fff);
    margin-bottom: 16px;
}
.module-posts-list .post-item,
.module-photos-list .photo-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.9rem;
}
.module-posts-list .post-item:last-child { border-bottom: none; }
.module-photos-list .photo-item:last-child { border-bottom: none; }
.module-posts-list .post-item a { color: inherit; text-decoration: none; }
.module-posts-list .post-item a:hover { text-decoration: underline; }

/* Latest Photos: 1:1 grid, show more of each image (contain) */
.module-photos-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.module-photos-list .photo-item {
    padding: 0;
    border-bottom: none;
    cursor: pointer;
}
.module-photos-list .photo-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0;
    max-height: none;
    background: rgba(255,255,255,0.04);
}
.module-photos-list .photo-item span {
    display: block;
    font-size: 0.8rem;
    margin-top: 6px;
    color: var(--of-text-muted, rgba(255,255,255,0.7));
    line-height: 1.3;
}
@media (max-width: 600px) {
    .module-photos-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
.module-top8-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.module-top8-list .top8-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.module-top8-list .top8-item a {
    color: inherit;
    text-decoration: none;
}
.module-top8-list .top8-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
}
.module-top8-list .top8-username {
    font-size: 0.75rem;
    color: var(--of-text-muted, rgba(255,255,255,0.75));
}
.module-empty {
    font-size: 0.9rem;
    color: var(--of-text-muted, rgba(255,255,255,0.6));
    padding: 12px 0;
}

/* Admin module toggles */
.admin-modules {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0;
}
.admin-modules .module-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    transition: background 0.2s, border-color 0.2s;
}
.admin-modules .module-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}
.admin-modules .module-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--of-primary, #3b82f6);
    cursor: pointer;
}

/* Admin font controls */
.admin-font-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
}
.admin-font-row label:first-child {
    flex: 0 0 auto;
}
.admin-font-select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: #1a1a24;
    color: #e2e2e8;
    font-size: 0.9rem;
    min-width: 140px;
}
.admin-font-select option {
    background: #1a1a24;
    color: #e2e2e8;
}
.admin-font-size-label {
    margin-left: 8px;
    flex: 0 0 auto;
}
.admin-font-row .form-hint {
    flex: 1 1 100%;
    margin-top: 0;
}
/* Show Buy/Sell uses same treatment when in form-group */
.form-group > .module-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    margin-bottom: 8px;
}
.form-group > .module-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--of-primary, #3b82f6);
}
.admin-top8-section { margin-top: 16px; }
.admin-top8-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.admin-top8-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    cursor: grab;
}
.admin-top8-row:hover { background: rgba(255,255,255,0.06); }
.admin-top8-row.dragging { opacity: 0.6; cursor: grabbing; }
.admin-top8-drag-handle {
    color: rgba(255,255,255,0.5);
    cursor: grab;
}
.admin-top8-drag-handle:active { cursor: grabbing; }
.admin-top8-row input { flex: 1; padding: 8px 12px; }
.desopage-onepage .desopage-section {
    margin-bottom: 40px;
}
.desopage-onepage .desopage-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}
/* Logged-in top bar: logout above avatar/name at top right */
.desopage-topbar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 20px;
}

.desopage-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desopage-topbar .profile-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.desopage-topbar-user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.desopage-topbar .username {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.desopage-topbar .usdc-balance-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.desopage-topbar .usdc-balance-topbar {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: filter 0.2s ease;
}

.desopage-topbar .usdc-balance-topbar.usdc-balance-blurred {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.desopage-topbar .usdc-balance-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 2px;
    font-size: 0.85rem;
    line-height: 1;
}

.desopage-topbar .usdc-balance-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
}

.desopage-topbar .usdc-balance-toggle i {
    display: block;
}

.desopage-topbar .btn-logout {
    margin-left: 0;
}
.desopage-onepage .desopage-balance-section {
    margin-top: 24px;
}
/* Linktree-style links */
.desopage-links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.desopage-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--of-box-bg, rgba(255,255,255,0.08));
    border: 1px solid var(--of-box-border, rgba(255,255,255,0.12));
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}
.desopage-link-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}
.desopage-link-item i {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Theme / layout selector */
.theme-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0;
}
.theme-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.theme-option:hover { background: rgba(255,255,255,0.1); }
.theme-option input { margin: 0; }
.theme-option:has(input:checked) {
    background: var(--of-primary, #3b82f6);
    border-color: var(--of-primary, #3b82f6);
    color: #fff;
}

/* Admin link rows */
.admin-links-section label { display: block; margin-bottom: 4px; }
.admin-links-list { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.admin-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    cursor: grab;
}
.admin-link-row:hover { background: rgba(255,255,255,0.02); }
.admin-link-row.dragging { opacity: 0.6; cursor: grabbing; }
.admin-link-drag-handle {
    color: rgba(255,255,255,0.5);
    cursor: grab;
}
.admin-link-drag-handle:active { cursor: grabbing; }
.admin-link-row select.admin-link-platform { width: 140px; flex-shrink: 0; padding: 10px 12px; }
.admin-link-row .admin-link-label { flex: 1; min-width: 100px; padding: 10px 12px; }
.admin-link-row .admin-link-url { flex: 1; min-width: 120px; padding: 10px 12px; }
.admin-link-row .admin-link-remove {
    padding: 8px 12px;
    background: rgba(239,68,68,0.2);
    border: 1px solid rgba(239,68,68,0.4);
    border-radius: 8px;
    color: #f87171;
    cursor: pointer;
}
.admin-link-row .admin-link-remove:hover { background: rgba(239,68,68,0.3); }

.desopage-onepage .desopage-about .desopage-about-content {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}
.desopage-onepage .desopage-about .desopage-about-content p {
    margin-bottom: 12px;
}
.desopage-hero-inner {
    max-width: 420px;
    width: 100%;
}
.desopage-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--of-text, #fff);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.desopage-tagline {
    font-size: 0.95rem;
    color: var(--of-text-muted, rgba(255,255,255,0.75));
    margin-bottom: 28px;
    line-height: 1.5;
}
.desopage-stats-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 28px;
    margin-bottom: 28px;
    padding: 18px 20px;
    background: var(--of-box-bg, rgba(255,255,255,0.06));
    border-radius: 16px;
    border: 1px solid var(--of-box-border, rgba(255,255,255,0.1));
}
.desopage-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.desopage-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--of-text, #fff);
}
.desopage-stat-label {
    font-size: 0.75rem;
    color: var(--of-text-muted, rgba(255,255,255,0.6));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}
.desopage-progress-wrap {
    flex: 1 1 100%;
    max-width: 280px;
    margin: 0 auto;
}
.desopage-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.desopage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--of-primary), var(--of-primary-dark, var(--of-primary)));
    border-radius: 4px;
    transition: width 0.4s ease;
}
.desopage-progress-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
}

/* ========== Layout: Horizontal (scroll left-right) ========== */
html:has(#app.layout-horizontal),
body:has(#app.layout-horizontal) { overflow: hidden; }
#app.layout-horizontal {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    height: 100vh;
}
#app.layout-horizontal .desopage-hero {
    min-width: 100vw;
    flex-shrink: 0;
    scroll-snap-align: start;
    min-height: 100vh;
}
#app.layout-horizontal .desopage-content-wrapper {
    min-width: 100vw;
    flex-shrink: 0;
    scroll-snap-align: start;
    overflow-y: auto;
}
#app.layout-horizontal .desopage-main {
    max-width: none;
    margin: 0;
    padding: 40px 24px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#app.layout-horizontal .desopage-main .desopage-section,
#app.layout-horizontal .desopage-main .desopage-logged-in-content {
    width: 100%;
    max-width: 480px;
}

/* ========== Layout: Cards (visual card grid) ========== */
#app.layout-cards .desopage-main {
    max-width: 680px;
}
#app.layout-cards .desopage-links-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
#app.layout-cards .desopage-link-item {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px;
    min-height: 100px;
}
#app.layout-cards .desopage-link-item i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
#app.layout-cards .desopage-hero-inner {
    max-width: 480px;
}
#app.layout-cards .desopage-balance-card {
    border-radius: 20px;
    padding: 28px;
}
#app.layout-cards .desopage-about .desopage-about-content {
    padding: 24px;
    background: var(--of-box-bg, rgba(255,255,255,0.06));
    border-radius: 16px;
    border: 1px solid var(--of-box-border, rgba(255,255,255,0.12));
}

/* ========== Layout: Minimal (clean, spacious) ========== */
#app.layout-minimal .desopage-main {
    max-width: 420px;
}
#app.layout-minimal .desopage-hero {
    padding: 48px 20px 36px;
}
#app.layout-minimal .desopage-title {
    font-size: 1.8rem;
    font-weight: 600;
}
#app.layout-minimal .desopage-tagline {
    font-size: 0.9rem;
    margin-bottom: 32px;
}
#app.layout-minimal .desopage-section {
    margin-bottom: 48px;
}
#app.layout-minimal .desopage-link-item {
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.04);
}
#app.layout-minimal .desopage-link-item:hover {
    background: rgba(255,255,255,0.08);
    transform: none;
}
#app.layout-minimal .desopage-stats-bar {
    padding: 14px 18px;
    border-radius: 12px;
}
#app.layout-minimal .desopage-section-title {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--of-text-muted, rgba(255,255,255,0.6));
    margin-bottom: 12px;
}

.desopage-cta {
    padding: 14px 32px;
    font-size: 1.05rem;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--of-primary) 0%, var(--of-primary-dark, var(--of-primary)) 100%);
    border: none;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}
.desopage-cta:hover {
    background: linear-gradient(135deg, var(--of-primary-dark, var(--of-primary)) 0%, var(--of-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
}
.desopage-steps {
    display: flex;
    justify-content: center;
    gap: 12px 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}
.desopage-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    font-weight: 600;
    margin-right: 4px;
    font-size: 0.75rem;
}
.desopage-dashboard {
    padding: 20px;
    max-width: 480px;
    margin: 0 auto;
}
.desopage-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.desopage-dash-header .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.desopage-dash-header .profile-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.desopage-dash-header .username {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}
.desopage-balance-card {
    background: var(--of-box-bg, rgba(255,255,255,0.08));
    border: 1px solid var(--of-box-border, rgba(255,255,255,0.12));
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}
.desopage-balance-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}
.desopage-balance-card .balance {
    font-size: 2.75rem;
    font-weight: 700;
    color: #fff;
}
.desopage-percent {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.85);
    margin-top: 4px;
}
.desopage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.desopage-actions .action-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--of-box-bg, rgba(255,255,255,0.1));
    border: 1px solid var(--of-box-border, rgba(255,255,255,0.15));
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.desopage-actions .action-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}
.desopage-actions .desopage-action-buy,
.desopage-actions #buy-open-btn {
    background: linear-gradient(135deg, var(--of-primary) 0%, var(--of-primary-dark, var(--of-primary)) 100%);
    border-color: rgba(255,255,255,0.2);
    flex: 1 1 100%;
}
.desopage-actions .desopage-action-buy:hover,
.desopage-actions #buy-open-btn:hover {
    background: linear-gradient(135deg, var(--of-primary-dark, var(--of-primary)) 0%, var(--of-primary) 100%);
}
.desopage-history h3 {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    font-weight: 600;
}
.desopage-history .transactions {
    background: var(--of-box-bg, rgba(255,255,255,0.05));
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--of-box-border, rgba(255,255,255,0.08));
}
.desopage-history .empty-state {
    padding: 24px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}
.desopage-history .empty-state i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
    opacity: 0.7;
}

/* Dark theme: modals, forms, buy page, toasts */
.theme-dark .modal-content {
    background: var(--of-box-bg, #1a1a24);
    border: 1px solid var(--of-box-border, rgba(255, 255, 255, 0.08));
    color: var(--of-text, #e2e2e8);
}

.theme-dark .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .modal-header h3 {
    color: var(--of-text, #e2e2e8);
}

.theme-dark .close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.theme-dark .close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.theme-dark .form-group label {
    color: var(--of-text-muted, rgba(255, 255, 255, 0.85));
}

.theme-dark .form-group input {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--of-box-border, rgba(255, 255, 255, 0.12));
    color: var(--of-text, #e2e2e8);
}

.theme-dark .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.theme-dark .btn-primary {
    background: linear-gradient(135deg, var(--of-primary) 0%, var(--of-primary-dark, var(--of-primary)) 100%);
}

.theme-dark .form-group input:focus {
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.theme-dark .buy-section,
.theme-dark .topup-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #e2e2e8;
}

.theme-dark .buy-section h2,
.theme-dark .topup-section h2 {
    color: rgba(255, 255, 255, 0.9);
}

.theme-dark .buy-page .balance-section {
    background: linear-gradient(135deg, #1e1e2e 0%, #252538 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.theme-dark .address-box {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e2e8;
}

.theme-dark .total-cost-display,
.theme-dark .topup-content p {
    color: rgba(255, 255, 255, 0.8);
}

.theme-dark .toast {
    background: #1e1e2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e2e8;
}

/* Top holders modal – dark theme */
.modal-top-holders .holders-list-container {
    background: #16161f;
    border-color: rgba(255, 255, 255, 0.08);
}

.modal-top-holders .holder-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.modal-top-holders .holder-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.modal-top-holders .holder-item-you {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}

.modal-top-holders .holder-item-you:hover {
    background: rgba(59, 130, 246, 0.35);
}

.modal-top-holders .list-header h3,
.modal-top-holders .holder-name,
.modal-top-holders .balance-amount {
    color: #e2e2e8;
}

.modal-top-holders .balance-label,
.modal-top-holders .holder-address {
    color: rgba(255, 255, 255, 0.55);
}

.modal-top-holders .search-container input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e2e8;
}

.modal-top-holders .search-container input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modal-top-holders .search-container input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.modal-top-holders .search-container i {
    color: rgba(255, 255, 255, 0.5);
}

.modal-top-holders .loading-state,
.modal-top-holders .empty-state,
.modal-top-holders .error-state {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
}

/* FAQ dark */
.theme-dark .faq-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-dark .faq-question {
    color: #e2e2e8;
}

.theme-dark .faq-answer {
    color: rgba(255, 255, 255, 0.8);
}

/* Top holders & FAQ trigger buttons and modals */
.desopage-popup-triggers {
    margin-top: 8px;
    margin-bottom: 32px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn-popup-trigger,
.btn-faq-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-popup-trigger:hover,
.btn-faq-open:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* Top holders modal */
.modal-top-holders .modal-content {
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-top-holders-content .modal-header {
    flex-shrink: 0;
}

.modal-top-holders-body {
    overflow-y: auto;
    padding-right: 8px;
    margin: 0 -8px 0 0;
}

.modal-top-holders-body .holders-content {
    padding: 0;
}

.modal-top-holders-body .holders-list-container {
    margin-top: 0;
}

.modal-top-holders-body .search-container input {
    width: 100%;
}

.modal-faq .modal-content {
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-faq-content .modal-header {
    flex-shrink: 0;
}

.modal-faq-body {
    overflow-y: auto;
    padding-right: 8px;
    margin: 0 -8px 0 0;
}

.modal-faq-body .faq-page {
    margin: 0;
    padding: 0;
}

.modal-faq-body .faq-section {
    margin-bottom: 20px;
}

.modal-faq-body .faq-section h2 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.modal-faq-body .faq-item {
    margin-bottom: 8px;
}

.modal-faq-body .faq-question {
    background: #2d2d38;
    color: rgba(255, 255, 255, 0.9);
}

.modal-faq-body .faq-question:hover {
    background: #363642;
}

.modal-faq-body .faq-question.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Buy modal */
.modal-buy .modal-content {
    max-width: 420px;
}

.modal-buy-body {
    padding: 0;
}

.modal-buy-body .buy-section {
    margin: 0;
}

/* Deposit modal */
.modal-deposit .modal-content {
    max-width: 480px;
}

.modal-deposit-body {
    padding: 0;
}

.modal-deposit-body .topup-content {
    margin: 0;
}

.modal-deposit-body .address-box {
    margin-bottom: 16px;
}

/* Sell modal */
.modal-sell .modal-content {
    max-width: 420px;
}

.modal-sell-body .sell-section {
    margin: 0;
}

.modal-sell-body .sell-balance-hint {
    margin-bottom: 12px;
    color: var(--of-text-muted, rgba(255, 255, 255, 0.75));
}

/* Withdraw modal */
.modal-withdraw .modal-content {
    max-width: 480px;
}

.modal-withdraw-body .withdraw-content {
    margin: 0;
}

.modal-withdraw-body .withdraw-usdc-balance {
    margin-bottom: 16px;
}

.modal-withdraw-body .withdraw-instructions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--of-box-border, rgba(255, 255, 255, 0.12));
}

.modal-withdraw-body .withdraw-instructions .address-box {
    margin: 12px 0;
}

.modal-withdraw-body .withdraw-hint {
    margin: 12px 0;
    font-size: 0.9rem;
    color: var(--of-text-muted, rgba(255, 255, 255, 0.75));
}

/* Page Header Structure (for other pages) */
.page-header {
    background: linear-gradient(135deg, #1e1e2e 0%, #252538 50%, #2a2a40 100%);
    color: #e2e2e8;
    padding: 24px 20px 28px;
    border-radius: 0 0 24px 24px;
    margin: -20px -20px 20px -20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.theme-dark .page-header {
    background: linear-gradient(135deg, #161622 0%, #1c1c28 50%, #222234 100%);
    color: #e2e2e8;
}

.page-header .header-top {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 16px;
    width: 100%;
}

.page-header .nav-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.page-header .btn-icon {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.page-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Log out button — dashboard and subpage headers */
.btn-logout,
.page-header .header-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-logout:hover,
.page-header .header-logout:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-1px);
}

.desopage-dash-header .btn-logout {
    margin-left: auto;
}

.page-header .nav-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-header .header-logout {
    margin-left: auto;
}

.page-header .page-title {
    text-align: center;
}

.page-header .page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.page-header .page-title p {
    font-size: 0.95rem;
    opacity: 0.85;
    margin: 0;
    font-weight: 400;
}

/* Page Content Structure */
.page-content {
    padding: 20px;
    background: linear-gradient(180deg, #12121a 0%, #0f0f16 100%);
    border-radius: 24px 24px 0 0;
    margin: 0 -20px -20px -20px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    min-height: calc(100vh - 200px);
    color: #e2e2e8;
}

.theme-dark .page-content {
    background: linear-gradient(180deg, #12121a 0%, #0d0d14 100%);
    color: #e2e2e8;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}

.screen.active {
    display: block;
}

#login-screen {
    padding: 0;
}

/* Login Screen */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    padding: 40px 20px;
    overflow-y: auto;
}

.login-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(40, 40, 40, 0.9) 0%, rgba(20, 20, 20, 0.9) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="matrix" patternUnits="userSpaceOnUse" width="60" height="60"><text x="30" y="35" text-anchor="middle" fill="%2300FF00" font-size="8" opacity="0.1">BarterCoin</text></pattern></defs><rect width="100" height="100" fill="url(%23matrix)"/></svg>');
    background-size: 60px 60px, cover;
    animation: backgroundMove 160s linear infinite;
    z-index: -2;
}

.login-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
    animation: lightMove 15s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundMove {
    0% {
        background-position: 0% 0%, 0% 0%;
    }
    100% {
        background-position: 100% 0%, 100% 0%;
    }
}

@keyframes lightMove {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.logo {
    margin-bottom: 24px;
    text-align: center;
}

.logo i {
    font-size: 4rem;
    color: #ffd700;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo .tagline {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 400;
    margin: 0;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* Hero Section */
.hero-section {
    margin-bottom: 28px;
    text-align: center;
}

.hero-text {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

/* Connect Button Enhancement */
.btn-connect {
    padding: 16px 40px;
    font-size: 1.1rem;
    margin-bottom: 32px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
}

.btn-connect:hover {
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
    max-width: 340px;
    width: 100%;
}

.feature-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 8px;
    display: block;
}

.feature-item span {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

/* About Section */
.about-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 24px;
    max-width: 360px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    text-align: center;
    color: #ffd700;
}

.about-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.85;
    text-align: center;
    margin: 0;
}

/* How It Works Section */
.how-it-works {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 24px;
    max-width: 360px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.how-it-works h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    color: #ffd700;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.step-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Help Note Link */
.help-note {
    font-size: 0.85rem;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.help-note a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
}

.help-note a:hover {
    text-decoration: underline;
}

.info {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.info p {
    margin-bottom: 10px;
    font-weight: 500;
}

.info code {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    word-break: break-all;
}

.help-dropdown {
    margin-top: 30px;
    text-align: center;
}

.help-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 12px 24px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.help-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.help-toggle i {
    font-size: 1.1rem;
}

.help-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.help-content.active {
    max-height: 300px;
    opacity: 1;
}

.help-content h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
    color: white;
}

.help-content ol {
    padding-left: 20px;
    color: white;
}

.help-content li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.help-content p {
    color: white;
    margin-top: 15px;
    text-align: center;
}

/* Wallet Screen */
#wallet-screen {
    background: linear-gradient(180deg, #f8f9fa 0%, #eef1f5 100%);
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 20px 28px;
    border-radius: 0 0 24px 24px;
    margin: -20px -20px 20px -20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-pic {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.1);
    display: block;
}

.profile-pic:not([src]), .profile-pic[src=""] {
    display: none;
}

.user-details {
    text-align: center;
    width: 100%;
}

.username {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    display: block;
}

.address-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: monospace;
    font-size: 0.8rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    margin-top: 15px;
}

#wallet-address {
    word-break: break-all;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.balance-section {
    text-align: center;
    padding-top: 4px;
}

.balance-section h2 {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.currency {
    font-size: 1rem;
    opacity: 0.75;
    font-weight: 500;
}

.wallet-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.address {
    font-family: monospace;
    font-size: 0.8rem;
    opacity: 0.9;
    word-break: break-all;
}

/* Action Buttons */
.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 18px 16px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.18);
    border-color: rgba(102, 126, 234, 0.2);
}

.action-btn:active {
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 1.4rem;
    color: #667eea;
    margin-bottom: 2px;
}

/* History Section */
.history-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.history-section h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.transactions {
    min-height: 180px;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
    color: #667eea;
}

.empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f0f2f5;
    color: #495057;
    border: 1px solid #e1e4e8;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #d1d5db;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Photo lightbox modal */
.modal-photo-lightbox {
    background: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}
.modal-photo-lightbox.active {
    animation: photoLightboxFadeIn 0.3s ease;
}
@keyframes photoLightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-photo-lightbox .photo-lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
}
.modal-photo-lightbox .photo-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    animation: photoLightboxImgFadeIn 0.35s ease 0.05s both;
}
@keyframes photoLightboxImgFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-photo-lightbox .photo-lightbox-caption {
    margin-top: 16px;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    max-width: 500px;
}
.modal-photo-lightbox .photo-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.2s;
}
.modal-photo-lightbox .photo-lightbox-close:hover {
    background: rgba(255,255,255,0.25);
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef0f2;
}

.modal-header h3 {
    font-size: 1.25rem;
    color: #333;
    font-weight: 600;
}

.close-btn {
    background: #f5f6f7;
    border: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #eef0f2;
    color: #333;
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.modal .form-group label {
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.25s ease;
    background: #fafbfc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #6b7280;
}

.theme-dark .form-hint {
    color: rgba(255, 255, 255, 0.5);
}

.modal-form {
    padding: 0 24px 24px;
}

.modal-admin-content {
    max-width: 560px;
}

.modal-admin-content .form-group label {
    color: #fff;
}

.modal-admin-content .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 100px;
    resize: vertical;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e2e8;
    font-family: inherit;
}

.modal-admin-content .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modal-admin-content .form-group textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.admin-colors {
    margin: 16px 0;
}

.admin-color-row .color-input-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-color-row input[type="color"] {
    width: 44px;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--of-box-border, rgba(255,255,255,0.12));
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-color-row .color-text {
    flex: 1;
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
}

.admin-form input[type="range"],
.modal-form input[type="range"] {
    width: 100%;
    height: 8px;
    margin: 8px 0;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.modal-form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--of-primary, #3b82f6);
    cursor: pointer;
}

.btn-link {
    background: none;
    border: none;
    color: var(--of-primary, #3b82f6);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    margin-bottom: 16px;
}

.btn-link:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.form-actions button {
    flex: 1;
}

/* Receive Modal */
.receive-content {
    text-align: center;
}

.qr-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

#qr-code {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.address-display {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.address-display .address-box {
    width: 100%;
    box-sizing: border-box;
}

.address-display label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.theme-dark .address-display label {
    color: #fff;
}

.address-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    margin-bottom: 15px;
    color: #495057;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    color: #333;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s ease;
    max-width: 320px;
    font-size: 0.95rem;
    font-weight: 500;
}

.toast.success {
    border-left: 4px solid #22c55e;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.08) 0%, white 100%);
}

.toast.error {
    border-left: 4px solid #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, white 100%);
}

.toast.info {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, white 100%);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Transaction Items */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f2f4;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    background-color: #fafbfc;
    margin: 0 -12px;
    padding: 14px 12px;
    border-radius: 10px;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.transaction-type.sent {
    color: #ef4444;
}

.transaction-type.received {
    color: #22c55e;
}

.transaction-address {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.transaction-amount {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1f2937;
}

.transaction-date {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .screen {
        padding: 15px;
    }
    
    #login-screen {
        padding: 0;
    }
    
    .login-container {
        padding: 32px 16px;
    }
    
    .logo i {
        font-size: 3rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .btn-connect {
        padding: 14px 32px;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }
    
    .features-grid {
        gap: 10px;
        max-width: 100%;
    }
    
    .feature-item {
        padding: 14px 10px;
    }
    
    .feature-item i {
        font-size: 1.3rem;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }
    
    .about-section,
    .how-it-works {
        padding: 20px 16px;
        max-width: 100%;
    }
    
    .about-section h3,
    .how-it-works h3 {
        font-size: 1rem;
    }
    
    .about-section p {
        font-size: 0.85rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .step-text {
        font-size: 0.85rem;
    }
    
    .header {
        margin: -15px -15px 15px -15px;
        padding: 25px 15px;
    }
    
    .page-header {
        margin: -15px -15px 15px -15px;
        padding: 25px 15px;
    }
    
    .page-header .page-title h1 {
        font-size: 1.5rem;
    }
    
    .page-content {
        padding: 15px;
        margin: 0 -15px -15px -15px;
        max-height: calc(100vh - 180px);
    }
    
    .balance {
        font-size: 2.5rem;
    }
    
    .actions {
        gap: 10px;
    }
    
    .action-btn {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .setup-instructions {
        margin: 20px 10px 0 10px;
        padding: 15px;
    }
    
    .help-toggle {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .help-content {
        max-width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
    }
    
    #wallet-screen {
        background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    }
    
    .page-content {
        background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    }
    
    .history-section {
        background: #252538;
        color: white;
        border-color: #333348;
    }
    
    .history-section h3 {
        color: white;
    }
    
    .action-btn {
        background: #252538;
        color: white;
        border-color: #333348;
    }
    
    .action-btn:hover {
        background: #2d2d42;
        border-color: rgba(102, 126, 234, 0.3);
    }
    
    .modal-content {
        background: #252538;
        color: white;
    }
    
    .modal-header {
        border-color: #333348;
    }
    
    .close-btn {
        background: #333348;
        color: #9ca3af;
    }
    
    .close-btn:hover {
        background: #404058;
        color: white;
    }
    
    .form-group label {
        color: #e5e7eb;
    }
    
    .form-group input {
        background: #1a1a2e;
        color: white;
        border-color: #333348;
    }
    
    .form-group input:focus {
        background: #252538;
        border-color: #667eea;
    }
    
    .form-group input::placeholder {
        color: #6b7280;
    }
    
    .address-box {
        background: #1a1a2e;
        color: #e5e7eb;
        border-color: #333348;
    }
    
    .transaction-item {
        border-color: #333348;
    }
    
    .transaction-item:hover {
        background: #2d2d42;
    }
    
    .transaction-amount {
        color: #e5e7eb;
    }
    
    .transaction-address {
        color: #9ca3af;
    }
    
    .empty-state {
        color: #6b7280;
    }
    
    .btn-secondary {
        background: #333348;
        color: #e5e7eb;
        border-color: #404058;
    }
    
    .btn-secondary:hover {
        background: #404058;
        border-color: #4a4a68;
    }
    
    .toast {
        background: #252538;
        color: #e5e7eb;
    }
    
    .toast.success {
        background: linear-gradient(90deg, rgba(34, 197, 94, 0.15) 0%, #252538 100%);
    }
    
    .toast.error {
        background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, #252538 100%);
    }
    
    .toast.info {
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, #252538 100%);
    }
}

/* Floating Money Elements */
.floating-money {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.matrix-text {
    position: absolute;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 0.6;
    animation: matrixFall 12s linear infinite;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    max-width: 100vw;
    max-height: 100vh;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    white-space: nowrap;
}

.matrix-logo {
    position: absolute;
    opacity: 0.5;
    animation: matrixFall 12s linear infinite;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
    width: 60px;
    height: 60px;
    pointer-events: none;
}



@keyframes matrixFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    95% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
}

/* Receive Page Styles */
.receive-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.receive-content {
    max-width: 500px;
    margin: 0 auto;
}

.receive-page .qr-container {
    background: white;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.receive-page .qr-container canvas,
.receive-page .qr-container img {
    border-radius: 12px;
}

.address-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.address-section h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 14px;
    font-weight: 600;
}

.receive-page .address-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    margin-bottom: 18px;
    color: #1f2937;
    border: none;
}

.receive-page .btn-primary {
    background: white;
    color: #667eea;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.receive-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.info-section {
    margin-top: 0;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-card i {
    font-size: 1.75rem;
    color: #667eea;
    margin-bottom: 14px;
    display: block;
}

.info-card h4 {
    color: #1f2937;
    font-size: 1.05rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.info-card p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile responsiveness for receive page */
@media (max-width: 480px) {
    .receive-page {
        padding: 0;
    }
    
    .receive-page .qr-container {
        padding: 24px;
    }
    
    .receive-page .qr-container canvas,
    .receive-page .qr-container img {
        max-width: 200px !important;
        max-height: 200px !important;
    }
    
    .address-section {
        padding: 20px 16px;
    }
    
    .receive-page .address-box {
        font-size: 0.7rem;
        padding: 12px 14px;
    }
    
    .info-card {
        padding: 20px 16px;
    }
}

/* Send Page Styles */
.send-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.send-content {
    max-width: 500px;
    margin: 0 auto;
}

/* Step Management */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* Address Input Section */
.address-input-section {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.input-group {
    margin-bottom: 18px;
    text-align: left;
    width: 100%;
}

.input-group label {
    display: block;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.address-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.address-input-container input {
    flex: 1;
    background: #fafbfc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #1f2937;
    transition: all 0.25s ease;
}

.address-input-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.paste-btn {
    background: #f0f2f5;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.paste-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.or-divider {
    margin: 20px 0;
    position: relative;
    text-align: center;
    width: 100%;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.or-divider span {
    background: white;
    color: #9ca3af;
    padding: 0 16px;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Center the continue button */
#continue-address-btn {
    display: block;
    margin: 0 auto;
    min-width: 200px;
}

/* Amount Section */
.recipient-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.recipient-pic {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.recipient-details {
    flex: 1;
}

.recipient-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.recipient-address {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.7rem;
    word-break: break-all;
}

.amount-section {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 16px;
    background: #f8f9fc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.balance-info span:first-child {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

.send-page .balance-amount {
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
}

.amount-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-input-container input {
    flex: 1;
    background: #fafbfc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    padding-right: 100px;
    font-size: 1.1rem;
    color: #1f2937;
    transition: all 0.25s ease;
}

.amount-input-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-page .currency-label {
    position: absolute;
    right: 16px;
    color: #9ca3af;
    font-size: 0.85rem;
    pointer-events: none;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.action-buttons .btn-primary,
.action-buttons .btn-secondary {
    flex: 1;
}

/* QR Scanner Modal */
.scanner-content {
    padding: 16px;
}

.scanner-placeholder {
    text-align: center;
    padding: 32px 20px;
}

.scanner-placeholder i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 14px;
    display: block;
}

.scanner-placeholder p {
    color: #6b7280;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

#qr-reader {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

/* Confirmation Modal */
.confirmation-content {
    padding: 8px;
}

.transaction-details {
    background: #f8f9fc;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef0f2;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-row:first-child {
    padding-top: 0;
}

.detail-row span:first-child {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.detail-row span:last-child {
    color: #1f2937;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.confirmation-actions {
    display: flex;
    gap: 12px;
}

.confirmation-actions .btn-primary,
.confirmation-actions .btn-secondary {
    flex: 1;
}

/* Mobile responsiveness for send page */
@media (max-width: 480px) {
    .send-page {
        padding: 0;
    }
    
    .address-input-section,
    .amount-section {
        padding: 20px 16px;
    }
    
    .address-input-container input {
        font-size: 0.85rem;
        padding: 12px 14px;
    }
    
    .recipient-info {
        padding: 16px;
    }
    
    .recipient-pic {
        width: 46px;
        height: 46px;
    }
    
    .recipient-name {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
}

/* Top Holders Page Styles */
.top-holders-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

.holders-content {
    max-width: 700px;
    margin: 0 auto;
}

.stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.holders-list-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 14px;
}

.list-header h3 {
    color: #1f2937;
    font-size: 1.15rem;
    margin: 0;
    font-weight: 600;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 280px;
}

.search-container input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fafbfc;
    font-size: 0.9rem;
    color: #1f2937;
    transition: all 0.25s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-container i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.holders-list {
    max-height: 500px;
    overflow-y: auto;
}

.holder-item {
    display: flex;
    align-items: center;
    padding: 14px;
    background: #fafbfc;
    border-radius: 14px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.25s ease;
}

.holder-item:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
}

.holder-item:last-child {
    margin-bottom: 0;
}

.holder-rank {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fbbf24, #fcd34d);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #78350f;
    font-size: 0.9rem;
    margin-right: 14px;
    flex-shrink: 0;
}

.holder-item:nth-child(1) .holder-rank {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.holder-item:nth-child(2) .holder-rank {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #374151;
}

.holder-item:nth-child(3) .holder-rank {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.holder-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 16px;
}

.holder-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.holder-pic {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.holder-details {
    flex: 1;
}

.holder-name {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.holder-address {
    color: #6b7280;
    font-size: 0.75rem;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.holder-balance {
    text-align: right;
    flex-shrink: 0;
}

.top-holders-page .balance-amount {
    color: #1f2937;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.balance-label {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: #4b5563;
    background: #fafbfc;
    border-radius: 14px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

.loading-state .spinner {
    margin: 0 auto 16px;
    border-color: rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
}

.loading-state p {
    margin: 0;
    font-size: 0.95rem;
}

.error-state {
    text-align: center;
    padding: 40px;
    color: #4b5563;
    background: #fef2f2;
    border-radius: 14px;
    margin: 20px 0;
    border: 1px solid #fecaca;
}

.error-state i {
    font-size: 2.5rem;
    color: #ef4444;
    margin-bottom: 16px;
}

.error-state p {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: #991b1b;
}

/* Mobile responsiveness for top holders page */
@media (max-width: 480px) {
    .top-holders-page {
        padding: 0;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .holders-list-container {
        padding: 16px;
    }
    
    .list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .holder-item {
        padding: 12px;
    }
    
    .holder-rank {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
        margin-right: 12px;
    }
    
    .holder-pic {
        width: 34px;
        height: 34px;
    }
    
    .holder-name {
        font-size: 0.9rem;
    }
    
    .holder-address {
        font-size: 0.65rem;
    }
    
    .top-holders-page .balance-amount {
        font-size: 0.95rem;
    }
}

/* Buy Page Styles */
.buy-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.buy-page .balance-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.buy-page .balance-section h2 {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usdc-balance {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.buy-page .currency-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.buy-section {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.buy-section h2 {
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.buy-section .form-group label {
    color: #374151;
}

.total-cost-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fc;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 16px 0;
    border: 1px solid #e5e7eb;
}

.total-cost-display span:first-child {
    color: #6b7280;
    font-size: 0.9rem;
}

.total-cost-display #total-cost {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.price-info {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.price-info p {
    color: #6b7280;
    margin: 4px 0;
    font-size: 0.9rem;
}

.price-info .rate {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.topup-section {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.topup-section h2 {
    color: #1f2937;
    margin-bottom: 16px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.topup-content {
    text-align: center;
    color: #4b5563;
}

.topup-content p {
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.topup-content ul {
    text-align: left;
    display: inline-block;
    margin: 16px 0;
}

.topup-content li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.topup-section .address-box {
    background: #f8f9fc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.8rem;
    word-break: break-all;
    margin-bottom: 16px;
    color: #374151;
}

.coming-soon {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.coming-soon p {
    color: #b45309;
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .buy-page {
        padding: 0;
    }
    
    .usdc-balance {
        font-size: 2rem;
    }
    
    .buy-section,
    .topup-section {
        padding: 20px 16px;
    }
}

/* FAQ Page Styles */
.faq-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

.faq-content {
    padding: 8px 0;
}

.faq-section {
    margin-bottom: 32px;
}

.faq-section h2 {
    color: #1f2937;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section h2 i {
    color: #667eea;
    font-size: 1.1rem;
}

.faq-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-question {
    background: #fafbfc;
    padding: 16px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
    transition: all 0.25s ease;
    gap: 12px;
}

.faq-question:hover {
    background: #f3f4f6;
}

.faq-question.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.faq-answer {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-answer.active {
    padding: 18px;
    max-height: 600px;
}

.faq-answer p {
    margin: 0 0 14px 0;
    line-height: 1.65;
    color: #4b5563;
    font-size: 0.9rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul, .faq-answer ol {
    margin: 12px 0;
    padding-left: 20px;
    color: #4b5563;
}

.faq-answer li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.faq-toggle {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-question.active .faq-toggle {
    transform: rotate(180deg);
}

@media (max-width: 480px) {
    .faq-page {
        padding: 0;
    }
    
    .faq-section h2 {
        font-size: 1.05rem;
    }
    
    .faq-question {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .faq-answer.active {
        padding: 16px;
    }
    
    .faq-answer p,
    .faq-answer li {
        font-size: 0.85rem;
    }
}

/* Callback Page Styles */
.callback-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.callback-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    color: white;
}

.callback-container h1 {
    margin-bottom: 10px;
    font-size: 24px;
}

.callback-container p {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.5;
}

.callback-container .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.callback-container .error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.callback-container .success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.callback-container .btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 10px;
    transition: all 0.3s ease;
}

.callback-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    .callback-container {
        padding: 20px;
        margin: 10px;
    }
    
    .callback-container h1 {
        font-size: 20px;
    }
}

/* Wallet Status Display on Login Screen */
.wallet-connected {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.connected {
    background: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-1px);
}

/* Success Page Styles */
.success-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.success-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 48px 32px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.success-icon {
    font-size: 3.5rem;
    color: #22c55e;
    margin-bottom: 20px;
    animation: successPulse 2s ease-in-out infinite;
    display: block;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
}

.success-container h1 {
    font-size: 1.75rem;
    margin-bottom: 14px;
    font-weight: 700;
}

.success-container p {
    font-size: 1rem;
    margin-bottom: 8px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Mobile responsiveness for success page */
@media (max-width: 480px) {
    .success-page {
        padding: 0;
    }
    
    .success-container {
        padding: 40px 24px;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .success-container h1 {
        font-size: 1.5rem;
    }
    
    .success-container p {
        font-size: 0.95rem;
    }
} 