/* ═══════════════════════════════════════════════════════
   PasteIndex Design System — style.css
   Link from every page: <link rel="stylesheet" href="style.css">
   ═══════════════════════════════════════════════════════ */

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

/* ── Light Theme (default) ──────────────────────────── */
:root {
    --accent: #00cc99;
    --accent-hover: #00b386;
    --accent-soft: rgba(0, 204, 153, 0.08);
    --accent-glow: 0 4px 14px rgba(0, 204, 153, 0.25);

    --bg-body: #f3f5f9;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-footer: #1a1a2e;

    --border: #e5e7eb;
    --border-input: #d1d5db;

    --text-1: #111827;
    --text-2: #4b5563;
    --text-3: #9ca3af;
    --text-footer: #94a3b8;
    --text-on-accent: #ffffff;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.1);

    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.25s ease;
}

/* ── Dark Theme ─────────────────────────────────────── */
[data-theme="dark"] {
    --bg-body: #0c0d12;
    --bg-header: #14151c;
    --bg-card: rgba(255,255,255,0.035);
    --bg-input: rgba(255,255,255,0.055);
    --bg-footer: #0a0a0f;

    --border: rgba(255,255,255,0.07);
    --border-input: rgba(255,255,255,0.1);

    --text-1: #e5e7eb;
    --text-2: #9ca3af;
    --text-3: #6b7280;
    --text-footer: #4b5563;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.5);
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

/* ── Base ───────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--transition), color var(--transition);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ── Header ─────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: background var(--transition), border-color var(--transition);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5em;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}

/* ── Logo ───────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2em;
    color: var(--text-1) !important;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #00cc99, #00e6ac);
    font-size: 0.85em;
    box-shadow: 0 2px 8px rgba(0,204,153,0.3);
}

.logo-sub {
    font-size: 0.6em;
    font-weight: 400;
    color: var(--text-3);
    display: block;
    line-height: 1;
    margin-top: 2px;
}

/* ── Navigation ─────────────────────────────────────── */
.site-nav {
    display: flex;
    align-items: center;
    gap: 0.3em;
}

/* ── Theme Toggle ───────────────────────────────────── */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 1.1em;
    transition: all var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.site-nav a {
    color: var(--text-2) !important;
    font-weight: 500;
    font-size: 0.85em;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent) !important;
    background: var(--accent-soft);
}

/* ── Container ──────────────────────────────────────── */
.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5em 1.5em;
    flex: 1;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8em;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
}

/* ── Page Hero ──────────────────────────────────────── */
.page-hero {
    text-align: center;
    margin-bottom: 2.5em;
}

.page-hero h1 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 0.4em;
    letter-spacing: -0.3px;
}

.page-hero p {
    font-size: 1.05em;
    color: var(--text-2);
    max-width: 550px;
    margin: 0 auto;
}

.accent { color: var(--accent); }

/* ── Blog Cards ─────────────────────────────────────── */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5em 1.8em;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border-left: 4px solid transparent;
}

.blog-card:hover {
    border-left-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.blog-card h2 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5em;
    line-height: 1.4;
}

.blog-card p {
    font-size: 0.9em;
    color: var(--text-2);
    line-height: 1.6;
}

/* ── Banner ─────────────────────────────────────────── */
.banner {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    text-align: center;
    padding: 0.9em 1.5em;
    font-weight: 600;
    font-size: 0.9em;
}

.banner a {
    color: #fffde6 !important;
    text-decoration: underline;
    font-weight: 700;
}

/* ── Forms ──────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75em 1em;
    font-family: 'Inter', sans-serif;
    font-size: 0.95em;
    color: var(--text-1);
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.4em;
}

.form-group { margin-bottom: 1.2em; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75em 1.5em;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
    box-shadow: var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,204,153,0.35);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text-1);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Section Headers ────────────────────────────────── */
.section-title {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Badge ──────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(0,204,153,0.15);
}

/* ── Generated Link ─────────────────────────────────── */
.generated-link {
    margin-top: 1em;
    padding: 1em;
    background: var(--accent-soft);
    border: 1px solid rgba(0,204,153,0.12);
    border-radius: var(--radius-sm);
    word-break: break-all;
    font-size: 0.9em;
    color: var(--accent);
}

/* ── Prose ──────────────────────────────────────────── */
.prose h2 { font-size: 1.3em; margin: 1.5em 0 0.6em; color: var(--text-1); }
.prose h3 { font-size: 1.1em; margin: 1.3em 0 0.5em; color: var(--text-1); }
.prose p { margin-bottom: 1em; color: var(--text-2); line-height: 1.7; }
.prose ul, .prose ol { margin: 0.5em 0 1em 1.5em; color: var(--text-2); }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--accent); text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
    background: var(--bg-footer);
    text-align: center;
    padding: 1.8em 1.5em;
    font-size: 0.85em;
    color: var(--text-footer);
    margin-top: auto;
    transition: background var(--transition);
}

.site-footer a { color: var(--text-footer); margin: 0 0.8em; }
.site-footer a:hover { color: var(--accent); }
.footer-links { margin-bottom: 0.6em; }

/* ── Utilities ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-3); }
.mt-1 { margin-top: 0.5em; }
.mt-2 { margin-top: 1em; }
.mt-3 { margin-top: 1.5em; }
.mb-2 { margin-bottom: 1em; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { display: flex; gap: 0.8em; }
.flex-1 { flex: 1; }

/* ── Responsive (Mobile) ────────────────────────────── */
@media (max-width: 640px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 0.7em 1em;
        gap: 0.5em;
    }

    .logo {
        font-size: 1.05em;
        order: 1;
    }

    .logo-sub { display: none; }

    .theme-toggle {
        order: 2;
        margin-left: auto;
        width: 34px;
        height: 34px;
    }

    .site-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 0.15em;
        padding-top: 0.4em;
        border-top: 1px solid var(--border);
    }

    .site-nav a {
        padding: 5px 10px;
        font-size: 0.82em;
    }

    .container { padding: 1.5em 1em; }
    .card { padding: 1.3em; }
    .page-hero h1 { font-size: 1.4em; }
    .page-hero p { font-size: 0.92em; }
    .flex-row { flex-direction: column; }
    .blog-card { padding: 1.2em; }
    .blog-card h2 { font-size: 1em; }
    .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5em; }
    .site-footer a { margin: 0; }
    .banner { font-size: 0.8em; padding: 0.7em 1em; }
}

