/**
 * Sovbit.host Landing Page
 * Clean Dark Theme with Bitcoin Orange & Nostr Purple
 */

/* ========================================================================
   Custom Fonts
   ======================================================================== */
@font-face {
    font-family: 'Brighton';
    src: url('fonts/BrightontwoSquareNbp-wvB8.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'USSR';
    src: url('fonts/USSR STENCIL WEBFONT.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Supermolot';
    src: url('fonts/SupermolotLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

/* ========================================================================
   CSS Variables
   ======================================================================== */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --bg-card: #1e1e2e;

    /* Bitcoin Orange */
    --bitcoin-orange: #f7931a;
    --bitcoin-orange-dark: #d97706;

    /* Nostr Purple */
    --nostr-purple: #a855f7;
    --nostr-purple-hover: #9333ea;
    --nostr-purple-light: #c084fc;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6b7280;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.1);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Supermolot', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Brighton', 'USSR', sans-serif;
    font-weight: 400;
    letter-spacing: 0.5px;
}

a {
    color: var(--nostr-purple);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

/* ========================================================================
   Navbar
   ======================================================================== */
.navbar {
    background: rgba(30, 30, 46, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo {
    height: 40px;
    mix-blend-mode: screen;
    filter: brightness(1.3);
    opacity: 0.9;
}

.navbar-brand-text {
    font-family: 'Brighton', sans-serif;
    font-size: 24px;
    background: linear-gradient(135deg, var(--bitcoin-orange) 0%, var(--nostr-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.navbar-links a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition-fast);
}

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

.navbar-portal-btn {
    color: white !important;
    font-size: 14px !important;
    padding: 8px 18px !important;
    border-radius: 6px !important;
}

.navbar-portal-btn:hover {
    color: white !important;
    opacity: 0.9;
}

/* ========================================================================
   Hero Section
   ======================================================================== */
.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background:
        radial-gradient(circle at 30% 40%, rgba(247, 147, 26, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
}

.hero-content {
    max-width: 900px;
}

.hero-logo {
    max-width: 300px;
    margin-bottom: 30px;
    mix-blend-mode: screen;
    filter: brightness(1.3);
    opacity: 0.9;
}

.hero h1 {
    font-size: clamp(40px, 8vw, 72px);
    margin-bottom: 24px;
    color: var(--nostr-purple);
    line-height: 1.1;
}

.hero p {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero p:last-of-type {
    margin-bottom: 40px;
}

.hero p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================================================
   Buttons
   ======================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.btn-primary {
    background: var(--bitcoin-orange);
    color: var(--bg-primary);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--nostr-purple);
    color: var(--nostr-purple);
}

.btn-secondary:hover {
    opacity: 0.8;
}

/* ========================================================================
   Sections
   ======================================================================== */
section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================================================
   Services Section
   ======================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-fast);
}

.service-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.service-icon {
    font-size: 28px;
}

.service-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.service-pricing {
    color: var(--bitcoin-orange);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
}

.service-link {
    display: inline-block;
    margin-top: auto;
    padding: 10px 20px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    color: var(--nostr-purple);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: var(--transition-fast);
}

.service-link:hover {
    background: rgba(168, 85, 247, 0.2);
    opacity: 1;
}

.service-extra {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.service-extra button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition-fast);
}

.service-extra button:hover {
    color: var(--nostr-purple);
}

/* ========================================================================
   Pricing Section
   ======================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition-fast);
}

.pricing-card:hover {
    border-color: rgba(168, 85, 247, 0.5);
}

.pricing-name {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.pricing-price {
    font-size: 48px;
    font-family: 'Brighton', sans-serif;
    color: var(--bitcoin-orange);
    margin-bottom: 8px;
}

.pricing-period {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
    text-align: left;
}

.pricing-features li {
    padding: 10px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 18px;
}

/* ========================================================================
   Stats Section
   ======================================================================== */
.stats-section {
    background: var(--bg-secondary);
    padding: 60px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-value {
    font-size: 48px;
    font-family: 'Brighton', sans-serif;
    color: var(--nostr-purple);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================================================
   NIP-05 Registration Section
   ======================================================================== */
.nip05-section {
    padding: 80px 20px;
}

.nip05-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
}

.nip05-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--nostr-purple);
    background: rgba(168, 85, 247, 0.05);
}

.form-group input.validated {
    border-color: var(--success);
}

.form-group input.invalid {
    border-color: var(--danger);
}

.key-preview {
    margin-top: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    display: none;
}

.test-button {
    margin-top: 10px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-fast);
}

.test-button:hover {
    border-color: var(--nostr-purple);
    color: var(--nostr-purple);
}

.submit-button {
    width: 100%;
    padding: 14px 32px;
    background: var(--bitcoin-orange);
    color: var(--bg-primary);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.submit-button:hover:not(:disabled) {
    opacity: 0.9;
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-ui {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: none;
}

.payment-details h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-align: center;
}

.payment-details p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.otc-input {
    margin-bottom: 12px;
}

.payment-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

/* ========================================================================
   Modal
   ======================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.close-button {
    float: right;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.close-button:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-primary);
    clear: both;
}

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

.compatible-clients a {
    padding: 14px 20px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    color: var(--nostr-purple);
    font-weight: 600;
    text-align: center;
    transition: var(--transition-fast);
}

.compatible-clients a:hover {
    background: rgba(168, 85, 247, 0.2);
    opacity: 1;
}

/* ========================================================================
   Notification
   ======================================================================== */
.notification {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    border: 1px solid var(--nostr-purple);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    min-width: 300px;
}

/* ========================================================================
   Footer
   ======================================================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========================================================================
   Responsive Design
   ======================================================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .navbar-links {
        gap: 15px;
    }

    .navbar-links a {
        font-size: 14px;
    }

    .hero {
        padding: 40px 20px;
    }

    section {
        padding: 60px 20px;
    }

    .features-grid,
    .services-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .nip05-container {
        padding: 30px 20px;
    }

    .notification {
        right: 20px;
        left: 20px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .navbar-brand-text {
        font-size: 18px;
    }

    .navbar-logo {
        height: 32px;
    }
}

/* ========================================================================
   Dark Mode Scrollbar
   ======================================================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.5);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.3) var(--bg-secondary);
}

/* ========================================================================
   Payment Modal
   ======================================================================== */
.payment-modal {
    max-width: 500px;
}

.payment-step {
    display: none;
}

.payment-step.active {
    display: block;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
}

.modal-info {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.modal-info p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.modal-info strong {
    color: var(--text-primary);
}

.error-message {
    color: var(--danger);
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
}

.qr-code-container canvas, .qr-code-container img {
    border-radius: 0;
    border: none;
    display: block;
}

.invoice-container {
    margin: 20px 0;
}

.invoice-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: monospace;
    margin-bottom: 10px;
    word-break: break-all;
}

.payment-waiting {
    text-align: center;
    margin-top: 30px;
}

.payment-waiting .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid rgba(168, 85, 247, 0.2);
    border-top-color: var(--nostr-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.payment-waiting p {
    color: var(--text-secondary);
    margin: 10px 0;
}

.payment-expires {
    color: var(--bitcoin-orange);
    font-weight: 600;
    font-size: 14px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.success-info {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.success-info p {
    margin: 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.success-info strong {
    color: var(--text-primary);
    display: inline-block;
    width: 80px;
}

.dm-notice {
    text-align: center;
    color: var(--bitcoin-orange);
    font-size: 14px;
    margin: 20px 0;
    padding: 12px;
    background: rgba(247, 147, 26, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(247, 147, 26, 0.3);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}
