/* ==========================================================================
   doi.uz - Ultra-Clean White Minimalist Design System (Apple / Stripe Style)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Pure White Palette */
    --bg-white: #ffffff;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    
    /* High Contrast Charcoal & Slate Typography */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    /* University Emerald Accent */
    --emerald-primary: #0d7a57;
    --emerald-hover: #059669;
    --emerald-light: #ecfdf5;
    --emerald-border: #a7f3d0;
    --emerald-glow: rgba(13, 122, 87, 0.12);

    /* Subtle Hairline Borders */
    --border-light: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-active: #0d7a57;

    /* Fonts & Motion */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px -4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    font-family: var(--font-sans);
    background-color: var(--bg-white);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Subtle Canvas Particles for Clean White Background */
#networkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0.45;
    pointer-events: auto;
}

/* App Container */
.app-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Clean White Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 1.1rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    gap: 0.2rem;
    color: var(--text-primary);
}

.doi-circle-white {
    width: 2.1em;
    height: 2.1em;
    background: var(--emerald-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.8em;
    font-weight: 800;
    box-shadow: 0 4px 12px var(--emerald-glow);
}

.brand-badge {
    font-size: 0.7rem;
    background: var(--emerald-light);
    color: var(--emerald-primary);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    border: 1px solid var(--emerald-border);
    font-weight: 700;
    margin-left: 0.75rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.btn-admin-nav {
    background: var(--text-primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--text-primary) !important;
    font-weight: 700 !important;
}

.btn-admin-nav:hover {
    background: var(--emerald-primary) !important;
    border-color: var(--emerald-primary) !important;
    box-shadow: 0 4px 14px var(--emerald-glow);
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2rem 0 3.5rem 0;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--emerald-light);
    border: 1px solid var(--emerald-border);
    color: var(--emerald-primary);
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.2px;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 1.25rem;
    letter-spacing: -1.8px;
    color: var(--text-primary);
}

.hero-title span {
    color: var(--emerald-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-weight: 400;
    line-height: 1.6;
}

/* White Clean Resolver Card */
.resolver-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.resolver-card:focus-within {
    border-color: var(--emerald-primary);
    box-shadow: var(--shadow-lg), 0 0 20px var(--emerald-glow);
}

.resolver-input-group {
    display: flex;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    padding: 0.45rem 0.45rem 0.45rem 1.15rem;
    transition: var(--transition);
}

.resolver-input-group:focus-within {
    border-color: var(--emerald-primary);
    background: #ffffff;
}

.resolver-prefix-label {
    display: flex;
    align-items: center;
    color: var(--emerald-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    user-select: none;
}

.resolver-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 500;
}

.resolver-input::placeholder {
    color: var(--text-subtle);
}

/* Buttons */
.btn-primary {
    background: var(--emerald-primary);
    color: #ffffff;
    border: none;
    padding: 0.8rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px var(--emerald-glow);
}

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

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 0.65rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

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

.sample-chip {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-family: var(--font-mono);
    cursor: pointer;
    font-size: 0.825rem;
    font-weight: 500;
    transition: var(--transition);
}

.sample-chip:hover {
    color: var(--emerald-primary);
    border-color: var(--emerald-border);
    background: var(--emerald-light);
}

/* Stats Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 1.6rem;
    text-align: left;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.3rem;
    font-weight: 900;
    color: var(--text-primary);
    font-family: var(--font-mono);
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}

/* Articles Catalog */
.catalog-section {
    margin-top: 5rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-primary);
}

.search-input-box {
    position: relative;
    width: 100%;
}

.search-input-box input {
    width: 100%;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 0.9rem 1rem 0.9rem 2.75rem;
    border-radius: 14px;
    color: var(--text-primary);
    outline: none;
    font-size: 0.95rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.search-input-box input:focus {
    border-color: var(--emerald-primary);
    box-shadow: var(--shadow-md);
}

.search-input-box i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.article-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 1.6rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-soft);
}

.article-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.doi-pill {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--emerald-light);
    color: var(--emerald-primary);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--emerald-border);
    font-weight: 700;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    line-height: 1.35;
}

.article-authors {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-light);
}

/* API Code Block */
.docs-section {
    margin-top: 5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: var(--shadow-soft);
}

.code-block {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 1.35rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #34d399;
    overflow-x: auto;
    margin-top: 1rem;
}

/* Admin Dashboard Modal (Clean White Modal) */
.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

.admin-overlay.active {
    display: block;
}

.admin-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.admin-header {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.admin-panel-content {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2rem;
    min-height: 500px;
    box-shadow: var(--shadow-md);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th {
    background: var(--bg-surface);
    color: var(--text-muted);
    padding: 1rem;
    border-bottom: 2px solid var(--border-light);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--emerald-primary);
    background: #ffffff;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-light);
    background: var(--bg-surface);
    padding: 3.5rem 1.5rem;
    margin-top: 6rem;
    color: var(--text-muted);
}
