/* ============================================================
   style.css - ClipperGen Premium UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-dark: #080c14;
    --bg-card: rgba(14, 21, 38, 0.85);
    --bg-input: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.7);
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.35);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-primary: #f0f4ff;
    --text-secondary: #8b9cc7;
    --text-muted: #4a5568;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-card: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border);
    --shadow-glow: 0 0 40px var(--accent-glow);
}

html,
body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Animated Background ──────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 20% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 90%, rgba(139, 92, 246, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 80% 40% at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Particles / Grid ─────────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ── Layout ───────────────────────────────────────────────── */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* ── Logo / Brand ─────────────────────────────────────────── */
.brand {
    text-align: center;
    margin-bottom: 40px;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    box-shadow: var(--shadow-glow);
    font-size: 28px;
    margin-bottom: 16px;
    animation: float 4s ease-in-out infinite;
}

.brand h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff 30%, var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand p {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.5s ease;
}

/* ── Key Reveal Custom ────────────────────────────────────── */
.key-reveal-card {
    margin-bottom: 24px;
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.05), var(--bg-card) 40%);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.15), 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.key-reveal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.key-reveal-icon {
    font-size: 28px;
    background: rgba(16, 185, 129, 0.15);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.key-reveal-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.key-reveal-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.key-display-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed var(--accent);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    word-break: break-all;
}

.key-actions {
    display: flex;
    gap: 12px;
}

.key-actions .btn {
    flex: 1;
}

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 32px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ── Form ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.alert-info {
    background: rgba(99, 102, 241, 0.10);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Dashboard Layout ─────────────────────────────────────── */
.dash-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 0;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
}

.topbar-brand .icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.key-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 10px;
}

/* ── Dashboard Content ────────────────────────────────────── */
.dash-content {
    max-width: 900px;
    margin: 48px auto;
    padding: 0 24px 80px;
}

.dash-title {
    margin-bottom: 8px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.dash-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 40px;
}

/* ── Generator Form Card ──────────────────────────────────── */
.gen-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-card);
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-hover);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.addr-section {
    margin-top: 32px;
}

/* ── Coin Row ─────────────────────────────────────────────── */
.coin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.coin-field {
    position: relative;
}

.coin-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.coin-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.coin-badge.btc {
    background: rgba(247, 147, 26, 0.15);
    color: #f7931a;
}

.coin-badge.eth {
    background: rgba(98, 126, 234, 0.15);
    color: #627eea;
}

.coin-badge.ltc {
    background: rgba(169, 169, 169, 0.15);
    color: #aaa;
}

.coin-badge.xmr {
    background: rgba(255, 102, 0, 0.15);
    color: #ff6600;
}

.coin-badge.trx {
    background: rgba(255, 0, 0, 0.15);
    color: #ff4444;
}

.coin-badge.xrp {
    background: rgba(0, 136, 204, 0.15);
    color: #0088cc;
}

.coin-field input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.coin-field input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.coin-field input::placeholder {
    color: var(--text-muted);
}

/* ── Generate Button Area ─────────────────────────────────── */
.generate-area {
    margin-top: 36px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.generate-area .note {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Info Banner ──────────────────────────────────────────── */
.info-banner {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-banner .info-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Spinning loader on button click */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .card {
        padding: 28px 20px;
    }

    .gen-card {
        padding: 24px 18px;
    }

    .grid-2,
    .coin-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 16px;
    }

    .dash-content {
        margin: 24px auto;
    }

    .generate-area {
        flex-direction: column;
        align-items: stretch;
    }
}