:root {
    --brand-green: #355f52;
    --brand-terracotta: #c46c52;
    --brand-blue: #16334f;
    --brand-cream: #f5efe6;
    --brand-muted: #6a747f;
    --surface: #ffffff;
    --surface-alt: #f8fafb;
    --border-soft: rgba(53, 95, 82, 0.14);
    --shadow-soft: 0 18px 50px rgba(18, 38, 52, 0.08);
    --radius-xl: 1.35rem;
}

html[data-bs-theme="dark"] {
    --surface: #13212d;
    --surface-alt: #182a38;
    --brand-cream: #0f1a22;
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.24);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, rgba(245,239,230,0.65), rgba(255,255,255,0.95));
    color: var(--bs-body-color);
    min-height: 100vh;
}

html[data-bs-theme="dark"] body {
    background: linear-gradient(180deg, rgba(9,18,26,0.98), rgba(16,30,40,1));
}

.app-navbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

html[data-bs-theme="dark"] .app-navbar {
    background: rgba(19, 33, 45, 0.92);
}

.navbar-brand { letter-spacing: -0.02em; }
.brand-orb {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-blue));
    box-shadow: 0 10px 30px rgba(22, 51, 79, 0.25);
}

.theme-toggle {
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--brand-blue);
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 2rem;
}

.hero-card,
.app-card,
.detail-card,
.footer-card,
.comment-card,
.name-card,
.admin-card,
.contribution-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.hero-card {
    padding: 2rem;
    position: relative;
}

.hero-badge,
.soft-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(53, 95, 82, 0.08);
    color: var(--brand-green);
    border: 1px solid rgba(53, 95, 82, 0.12);
}

.hero-title {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-green), var(--brand-terracotta));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-search-wrapper {
    position: relative;
}

.hero-search-wrapper .form-control,
.filter-form .form-select,
.filter-form .form-control,
.form-control,
.form-select {
    border-radius: 1rem;
    border: 1px solid var(--border-soft);
    padding: 0.85rem 1rem;
}

.hero-search-wrapper .form-control {
    font-size: 1.05rem;
    padding-right: 3.5rem;
}

.search-icon-btn {
    position: absolute;
    right: 0.65rem;
    top: 0.55rem;
    border-radius: 0.8rem;
}

.autocomplete-list {
    position: absolute;
    z-index: 25;
    width: 100%;
    margin-top: 0.45rem;
    padding: 0.5rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-list li a {
    display: block;
    padding: 0.7rem 0.85rem;
    text-decoration: none;
    color: inherit;
    border-radius: 0.8rem;
}

.autocomplete-list li a:hover {
    background: rgba(53, 95, 82, 0.08);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.name-card,
.contribution-card,
.comment-card,
.admin-card {
    padding: 1.25rem;
}

.name-card:hover,
.contribution-card:hover {
    transform: translateY(-2px);
    transition: 0.25s ease;
}

.name-title-link {
    text-decoration: none;
    color: inherit;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(22, 51, 79, 0.08);
    color: var(--brand-blue);
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
}

.highlight-ribbon {
    background: linear-gradient(135deg, var(--brand-terracotta), #f3a36d);
    color: white;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.contribution-card.top-rated {
    border: 1px solid rgba(196, 108, 82, 0.28);
    background: linear-gradient(180deg, rgba(196,108,82,0.08), rgba(255,255,255,0.98));
}

html[data-bs-theme="dark"] .contribution-card.top-rated {
    background: linear-gradient(180deg, rgba(196,108,82,0.14), rgba(19,33,45,0.98));
}

.vote-panel,
.comment-vote-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.2rem;
    background: rgba(53, 95, 82, 0.06);
}

.score-pill {
    min-width: 42px;
    text-align: center;
    font-weight: 700;
}

.share-stack .btn {
    border-radius: 999px;
}

.site-footer {
    background: var(--brand-cream);
    border-top: 1px solid var(--border-soft);
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    opacity: 0.9;
}

.footer-links a:hover {
    color: var(--brand-green);
}

.disclaimer {
    color: var(--brand-muted);
}

.empty-state {
    border: 2px dashed var(--border-soft);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    background: rgba(53, 95, 82, 0.03);
}

.page-header {
    padding: 2rem 0 1rem;
}

.profile-stat {
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(53, 95, 82, 0.06);
}

.reply-form .form-control {
    border-radius: 999px;
}

.comment-card {
    background: rgba(255, 255, 255, 0.92);
}

html[data-bs-theme="dark"] .comment-card {
    background: rgba(24, 42, 56, 0.92);
}

.admin-sidebar a {
    text-decoration: none;
}

.hover-soft:hover {
    background: rgba(53, 95, 82, 0.06);
}

@media (max-width: 767.98px) {
    .hero-card { padding: 1.5rem; }
    .section-heading { flex-direction: column; align-items: start; }
}