/* ==============================================================================
   RamforthSearch — Sovereign Dark Cyber Aesthetic Theme
   ============================================================================== */

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

:root {
    --rf-bg-main: #0c0f14;
    --rf-bg-card: #141922;
    --rf-bg-card-hover: #1b232f;
    --rf-bg-input: rgba(22, 28, 38, 0.85);
    --rf-border: rgba(255, 255, 255, 0.08);
    --rf-border-hover: rgba(255, 184, 73, 0.4);
    --rf-text-main: #e2e8f0;
    --rf-text-muted: #94a3b8;
    --rf-text-dim: #64748b;
    --rf-accent-gold: #ffb849;
    --rf-accent-gold-hover: #ffa726;
    --rf-accent-blue: #38bdf8;
    --rf-accent-green: #10b981;
    --rf-accent-purple: #c084fc;
    --rf-glow: rgba(255, 184, 73, 0.25);
}

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

body {
    background-color: var(--rf-bg-main);
    color: var(--rf-text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--rf-border);
    background: rgba(12, 15, 20, 0.95);
    backdrop-filter: blur(12px);
}

.brand-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-mini img {
    height: 36px;
    width: auto;
}

.brand-title-mini {
    font-family: 'Oswald', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
}

.brand-accent {
    color: var(--rf-accent-gold);
}

.header-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-link {
    color: var(--rf-text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid var(--rf-border);
    transition: all 0.2s ease;
}

.header-link:hover {
    color: var(--rf-accent-gold);
    border-color: var(--rf-accent-gold);
    background: rgba(255, 184, 73, 0.1);
}

/* Hero Section (Home Page) */
.hero-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.hero-brand {
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-logo {
    max-height: 120px;
    width: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.7));
    transition: transform 0.3s ease;
    margin-bottom: 1.25rem;
}

.hero-logo:hover {
    transform: scale(1.05);
}

.hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.hero-tagline {
    font-size: 1rem;
    color: var(--rf-text-muted);
    margin-top: 0.5rem;
}

/* Search Box Container */
.search-form {
    width: 100%;
    max-width: 680px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    background: var(--rf-bg-input);
    color: #ffffff;
    border: 1px solid var(--rf-border);
    border-radius: 9999px;
    padding: 0.95rem 3.5rem 0.95rem 1.75rem;
    font-size: 1.05rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input:focus {
    border-color: var(--rf-accent-gold);
    box-shadow: 0 0 0 3px var(--rf-glow), 0 8px 32px rgba(0, 0, 0, 0.6);
    outline: none;
    background: rgba(26, 33, 46, 0.95);
}

.search-submit-btn {
    position: absolute;
    right: 12px;
    background: var(--rf-accent-gold);
    color: #0c0f14;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-submit-btn:hover {
    background: var(--rf-accent-gold-hover);
    transform: scale(1.08);
}

/* Category Filter Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.category-pill {
    background: rgba(255, 255, 255, 0.04);
    color: var(--rf-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-pill:hover, .category-pill.active {
    background: rgba(255, 184, 73, 0.15);
    color: var(--rf-accent-gold);
    border-color: var(--rf-accent-gold);
}

/* Search Results Layout */
.results-page-layout {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem 1.5rem;
}

.results-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rf-border);
    font-size: 0.82rem;
    color: var(--rf-text-dim);
}

.badge-source {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: 'JetBrains Mono', monospace;
}

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

.badge-federated {
    background: rgba(56, 189, 248, 0.15);
    color: var(--rf-accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-wiki {
    background: rgba(192, 132, 252, 0.15);
    color: var(--rf-accent-purple);
    border: 1px solid rgba(192, 132, 252, 0.3);
}

/* Result Cards */
.result-card {
    background: var(--rf-bg-card);
    border: 1px solid var(--rf-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-card:hover {
    background: var(--rf-bg-card-hover);
    border-color: var(--rf-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.result-url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--rf-accent-blue);
    text-decoration: none;
    display: block;
    margin-bottom: 0.35rem;
    word-break: break-all;
}

.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--rf-accent-gold);
    text-decoration: none;
    line-height: 1.4;
    display: inline-block;
    margin-bottom: 0.5rem;
    transition: color 0.18s ease;
}

.result-title:hover {
    color: var(--rf-accent-gold-hover);
    text-decoration: underline;
}

.result-snippet {
    color: var(--rf-text-main);
    font-size: 0.92rem;
    line-height: 1.6;
}

.result-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

mark.highlight {
    background: rgba(255, 184, 73, 0.25);
    color: #ffffff;
    padding: 0 2px;
    border-radius: 2px;
}

/* Footer */
footer {
    border-top: 1px solid var(--rf-border);
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--rf-text-dim);
    margin-top: auto;
}

footer a {
    color: var(--rf-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--rf-accent-gold);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}
