:root {
    --primary: #ffffff;
    --secondary: #a0a0a0;
    --accent: #3b82f6;
    /* Subtle blue for interactive elements */
    --bg: #000000;
    --card-bg: #0a0a0a;
    --card-border: #1a1a1a;
    --text: #ffffff;
    --text-dim: #71717a;
    --error: #ef4444;
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 3rem;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
}

/* Nav */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.logo span {
    color: var(--text-dim);
    font-weight: 400;
    margin-left: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.net-status {
    background: transparent;
    color: var(--text);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--card-border);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

/* Home State */
#home-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 0 1rem;
}

.blockchain-selector {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.chain-options {
    display: flex;
    gap: 1rem;
}

.chain-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-dim);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chain-btn.active {
    border-color: var(--text);
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.hero-card {
    max-width: 600px;
}

.home-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Cards & Sections */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* Import Styles */
.import-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#import-input {
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: white;
    padding: 1rem;
    font-size: 1rem;
    min-height: 100px;
    resize: none;
    transition: all 0.2s;
}

#import-input:focus {
    border-color: var(--text-dim);
    outline: none;
}

/* Dashboard Styles */
.dashboard-header {
    margin-bottom: 2rem;
}

.seed-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.seed-phrase {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--card-border);
}

.seed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

.seed-word {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-dim);
}

.word-index {
    color: var(--text-dim);
    font-weight: 500;
    opacity: 0.5;
}

/* Buttons */
button {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--text-dim);
    border-radius: 6px;
    border: 1px solid var(--card-border);
}

.btn-icon:hover {
    color: var(--text);
    border-color: var(--text-dim);
}

/* Wallet Cards */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.wallet-grid {
    display: grid;
    gap: 1rem;
}

.wallet-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.2s;
}

.wallet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wallet-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.wallet-address {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    word-break: break-all;
}

.wallet-balances {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.balance-item {
    display: flex;
    flex-direction: column;
}

.balance-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.balance-symbol {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Watch Mode */
.watch-actions {
    margin-top: 1rem;
}

/* Utils */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem;
    }

    .home-actions {
        flex-direction: column;
    }

    .seed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}