@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

:root {
    --bg: #0a0a14;
    --bg2: #111122;
    --bg3: #1a1a33;
    --text: #d4d4e8;
    --text2: #8888aa;
    --purple: #7c3aed;
    --purple2: #6d28d9;
    --blue: #3b82f6;
    --green: #22c55e;
    --orange: #f59e0b;
    --red: #ef4444;
    --border: rgba(124, 58, 237, 0.2);
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* Background effect */
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(124,58,237,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,58,237,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,20,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-weight: 900;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--purple), var(--blue), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text2);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--purple); }

.btc-ticker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg3);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
}

.btc-ticker .price { color: var(--orange); }
.btc-ticker .change-up { color: var(--green); }
.btc-ticker .change-down { color: var(--red); }

/* Main content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--purple), var(--blue), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    color: var(--text2);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.hero .ethos {
    color: var(--text2);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* Tool grid */
.tools-section {
    margin: 3rem 0;
}

.tools-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--purple);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.tool-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(124, 58, 237, 0.4);
}

.tool-card:hover::before { opacity: 1; }

.tool-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.85rem;
    color: var(--text2);
}

/* Coming soon badge */
.coming-soon {
    display: inline-block;
    background: var(--bg3);
    color: var(--text2);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* Tip section */
.tip-section {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.tip-section h3 {
    color: var(--purple);
    margin-bottom: 0.5rem;
}

.tip-section p { color: var(--text2); font-size: 0.9rem; margin-bottom: 1rem; }

.btc-address {
    background: var(--bg3);
    padding: 0.8rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--orange);
    word-break: break-all;
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
}

.copy-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 1rem;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover { background: var(--purple2); }
.copy-btn.copied { background: var(--green); }

/* Nostr section */
.nostr-section {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.nostr-section h3 {
    color: var(--purple);
    margin-bottom: 0.5rem;
}

.nostr-section .npub {
    background: var(--bg3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--blue);
    display: inline-block;
    margin: 0.5rem 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text2);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

footer a { color: var(--purple); text-decoration: none; }

/* Tool pages */
.tool-page {
    max-width: 800px;
    margin: 0 auto;
}

.tool-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tool-page .back-link {
    display: inline-block;
    color: var(--text2);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.tool-page .back-link:hover { color: var(--purple); }

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text2);
    font-size: 0.9rem;
}

textarea, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
}

textarea:focus, input:focus {
    outline: none;
    border-color: var(--purple);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.btn:hover { background: var(--purple2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.result-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

.result-box.error {
    border-color: var(--red);
    color: var(--red);
}

.result-box.success {
    border-color: var(--green);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .tool-grid { grid-template-columns: 1fr; }
    .nav-inner { padding: 0 1rem; }
    .nav-links { gap: 1rem; }
    .nav-links a.nav-hide-mobile { display: none; }
}
