/* IOstamp BSV OP_RETURN API - Unified Styles */

/* ===== Design Tokens ===== */
:root {
    --primary: #135bec;
    --primary-dark: #0d42b0;
    --primary-glow: rgba(19, 91, 236, 0.5);
    --background-dark: #101622;
    --surface-dark: #1c2333;
    --surface-light: rgba(255, 255, 255, 0.05);
    --border-dark: rgba(255, 255, 255, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --danger: #ef4444;
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

/* ===== Base Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-display);
    background-color: var(--background-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-sm {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(16, 22, 34, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 15px var(--primary-glow));
    transition: filter 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border-dark);
    padding: 3rem 0;
    margin-top: 4rem;
    background: var(--surface-dark);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo {
    height: 32px;
    width: auto;
    opacity: 0.7;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    transition: fill 0.2s ease;
}

.social-icon:hover {
    fill: var(--text-primary);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== Cards ===== */
.card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.card:hover {
    border-color: rgba(19, 91, 236, 0.3);
}

.card-glass {
    background: var(--surface-light);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-dark);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.btn-outline:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(19, 91, 236, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* ===== Status Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 2rem;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary {
    background: rgba(19, 91, 236, 0.15);
    color: var(--primary);
    border: 1px solid rgba(19, 91, 236, 0.3);
}

/* Pulse Animation */
.pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pulse-success {
    background: var(--success);
}

.pulse-danger {
    background: var(--danger);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--success-glow);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 8px transparent;
    }
}

/* ===== Result Box ===== */
.result-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 1rem;
}

.result-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-item {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
}

.hash {
    word-break: break-all;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary);
}

/* ===== Endpoint List ===== */
.endpoint-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.method {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 0.25rem;
}

.method-get {
    background: var(--primary);
    color: white;
}

.method-post {
    background: var(--success);
    color: white;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    text-align: center;
}

.stat-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.gap-4 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    h1 { font-size: 1.75rem; }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}
