@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
    /* Deep Blue & Black/Grey Theme */
    --bg-dark: #05070a;
    --bg-card: rgba(10, 15, 25, 0.95);
    --bg-card-solid: #0b111d;
    --border-dark: rgba(251, 146, 60, 0.15);
    --border-glow: rgba(249, 115, 22, 0.4);

    /* Orange Accent Colors */
    --orange: #f97316;
    --orange-bright: #fb923c;
    --orange-glow: rgba(249, 115, 22, 0.5);

    /* Deep Blue Accent */
    --deep-blue: #1e3a8a;
    --blue-glow: rgba(30, 58, 138, 0.5);

    /* System Colors */
    --green: #10b981;
    --green-glow: rgba(16, 185, 129, 0.5);
    --red: #ef4444;
    --amber: #f59e0b;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Outfit", sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Updated Deep Blue / Dark Grid Background */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(30, 58, 138, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 58, 138, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Updated Orange/Blue Glow */
.glow-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(
            ellipse at 20% 0%,
            rgba(30, 58, 138, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse at 80% 100%,
            rgba(249, 115, 22, 0.08) 0%,
            transparent 50%
        );
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-dark);
}

.menu-btn {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    cursor: pointer;
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}

.menu-btn:hover {
    border-color: var(--orange);
    box-shadow: 0 0 20px var(--orange-glow);
}

.menu-btn span {
    width: 18px;
    height: 2px;
    background: var(--orange);
    border-radius: 1px;
}

/* --- 修改：使用真实图片代替 B 字符 --- */
.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-image: url("barkcoin_sq.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-card-solid); /* 图片加载失败时的后备颜色 */
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
    display: block;
    transition: box-shadow 0.3s ease;
}

.brand-logo:hover {
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.5);
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
}

.wallet-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--green-glow);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 10, 0.8);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s,
        visibility 0.3s;
    will-change: opacity;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 320px;
    z-index: 201;
    background: var(--bg-card-solid);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 40px 20px;
    border-right: 1px solid var(--border-glow);
    will-change: transform;
}

.side-nav.active {
    transform: translateX(0);
}

.nav-link {
    display: block;
    padding: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition:
        background-color 0.3s,
        color 0.3s,
        border-color 0.3s;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(249, 115, 22, 0.1);
    color: var(--orange);
    border-color: var(--border-dark);
}

.main {
    padding: 90px 20px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.card,
.swap-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--orange);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-dark);
    padding-bottom: 10px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 14px;
}

.data-row:last-child {
    border-bottom: none;
}

.data-lbl {
    color: var(--text-secondary);
}

.data-val {
    font-family: "JetBrains Mono", monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.highlight {
    color: var(--orange-bright) !important;
}

.green {
    color: var(--green) !important;
}

.input-group {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.input-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: "JetBrains Mono", monospace;
    font-size: 24px;
    color: var(--text-primary);
    width: 100%;
}

.asset-badge {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-dark);
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
}

/* Primary Action Button (Orange) */
.btn-submit {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    background: linear-gradient(135deg, var(--orange) 0%, #ea580c 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(234, 88, 12, 0.3);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* Secondary Button (Deep Blue/Outline) */
.btn-secondary {
    width: 100%;
    padding: 16px;
    margin-top: 12px;
    background: rgba(30, 58, 138, 0.2);
    color: var(--text-primary);
    border: 1px solid var(--deep-blue);
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(30, 58, 138, 0.4);
    box-shadow: 0 0 15px var(--blue-glow);
}

/* Action Group Grid for Buttons */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
