/* ===== megapki.pl — custom styles ===== */

:root {
    --mk-accent: #0d6efd;
    --mk-dark: #111827;
    --mk-card-bg: #1e2433;
    --mk-card-border: rgba(255, 255, 255, 0.07);
}

/* ---- Base ---- */
body {
    background-color: #0f1117;
    color: #e2e8f0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

a {
    color: var(--mk-accent);
}

/* Override Bootstrap muted/secondary for dark theme */
.text-muted {
    color: #94a3b8 !important;
}

.text-secondary {
    color: #94a3b8 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #f1f5f9;
}

p {
    color: #cbd5e1;
}

.small, small {
    color: #94a3b8;
}

code {
    color: #7dd3fc;
    background-color: rgba(125, 211, 252, 0.08);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.88em;
}

/* ---- Navbar ---- */
.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar .nav-link {
    color: #94a3b8 !important;
    transition: color 0.2s;
}

.navbar .nav-link:hover {
    color: #fff !important;
}

/* ---- Hero ---- */
.hero-section {
    background: linear-gradient(135deg, #0f1117 0%, #1a2035 50%, #0f1117 100%);
    border-bottom: 1px solid var(--mk-card-border);
    min-height: 360px;
    display: flex;
    align-items: center;
}

/* ---- Stats bar ---- */
.stats-bar {
    border-top: 1px solid var(--mk-card-border);
    border-bottom: 1px solid var(--mk-card-border);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

/* ---- Feature cards ---- */
.feature-card {
    background: var(--mk-card-bg);
    border: 1px solid var(--mk-card-border);
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(13, 110, 253, 0.4);
    transform: translateY(-2px);
}

/* ---- Catalog cards ---- */
.catalog-card {
    background: var(--mk-card-bg);
    border: 1px solid var(--mk-card-border);
    color: #e2e8f0;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.catalog-card:hover {
    border-color: rgba(13, 110, 253, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.app-icon {
    width: 48px;
    height: 48px;
    background: rgba(13, 110, 253, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon-lg {
    width: 54px;
    height: 54px;
    background: rgba(13, 110, 253, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

/* ---- Filter buttons ---- */
#filterBar .btn {
    border-radius: 20px;
    font-size: 0.82rem;
    transition: all 0.2s;
}

#filterBar .btn.active-filter,
#filterBar .btn.btn-primary {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35);
}

/* ---- Tutorial / TOC ---- */
.toc-card {
    background: var(--mk-card-bg);
    border: 1px solid var(--mk-card-border);
}

.toc-link {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    padding: 2px 0;
    transition: color 0.15s;
    border-left: 2px solid transparent;
    padding-left: 6px;
}

.toc-link:hover,
.toc-link.active {
    color: #fff;
    border-left-color: var(--mk-accent);
}

.tutorial-section {
    scroll-margin-top: 90px;
}

/* ---- Code blocks ---- */
.code-block {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    color: #7dd3fc;
}

.cmd-badge {
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: #7dd3fc;
    padding: 0.2em 0.55em;
    border-radius: 4px;
    font-size: 0.87em;
    white-space: nowrap;
}

/* ---- Connect cards ---- */
.connect-card {
    background: var(--mk-card-bg);
    border: 1px solid var(--mk-card-border);
    transition: border-color 0.2s;
}

.connect-card:hover {
    border-color: rgba(13, 110, 253, 0.4);
}

/* ---- Item cards ---- */
.item-card {
    background: var(--mk-card-bg);
    border: 1px solid var(--mk-card-border);
    transition: border-color 0.2s;
}

.item-card:hover {
    border-color: rgba(13, 110, 253, 0.35);
}

.item-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

/* ---- Tip cards ---- */
.tip-card {
    background: var(--mk-card-bg);
    border: 1px solid var(--mk-card-border);
    transition: border-color 0.2s;
}

.tip-card:hover {
    border-color: rgba(255, 193, 7, 0.3);
}

/* ---- Tables ---- */
.table {
    color: #e2e8f0;
}

.table-dark th {
    background-color: #1e2433;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-color: rgba(255, 255, 255, 0.08);
}

.table tbody td {
    border-color: rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

.table tbody tr:hover td {
    background-color: rgba(13, 110, 253, 0.05);
}

/* ---- Alerts ---- */
.alert-primary {
    background-color: rgba(13, 110, 253, 0.12);
    border-color: rgba(13, 110, 253, 0.35);
    color: #bfdbfe;
}

.alert-primary strong, .alert-primary a {
    color: #93c5fd;
}

.alert-info {
    background-color: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.35);
    color: #bae6fd;
}

.alert-info strong, .alert-info a {
    color: #7dd3fc;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

.alert-warning strong, .alert-warning a {
    color: #fcd34d;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #a7f3d0;
}

.alert-success strong, .alert-success a {
    color: #6ee7b7;
}

/* ---- Badges ---- */
.badge {
    font-weight: 500;
}

/* ---- Breadcrumb ---- */
.breadcrumb-item a {
    color: #7dd3fc;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #bfdbfe;
}

.breadcrumb-item.active {
    color: #cbd5e1;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #64748b;
}

/* ---- Sections ---- */
.bg-body-tertiary {
    background-color: #151b27 !important;
}

/* ---- Footer ---- */
.footer {
    border-top: 1px solid var(--mk-card-border);
    color: #94a3b8;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0f1117;
}

::-webkit-scrollbar-thumb {
    background: #2d3a4f;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d4f6f;
}

/* ---- kbd ---- */
kbd {
    background-color: #1e2d3d;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 0.8em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ---- Opacity helper ---- */
.opacity-60 {
    opacity: 0.6;
}

/* ---- Feature/catalog card inner text ---- */
.feature-card h6,
.feature-card .fw-bold {
    color: #f1f5f9;
}

.catalog-card .card-title,
.catalog-card h4,
.catalog-card h5,
.catalog-card h6 {
    color: #f1f5f9;
}

/* Ensure muted text inside cards stays readable */
.feature-card .text-muted,
.catalog-card .text-muted,
.connect-card .text-muted,
.item-card .text-muted,
.tip-card .text-muted,
.toc-card .text-muted {
    color: #94a3b8 !important;
}

/* Stats bar labels */
.stat-label {
    color: #94a3b8;
}

/* Lead text in hero is white, but outside hero it should be lighter */
.lead {
    color: #cbd5e1;
}

/* Footer links */
.footer a {
    color: #7dd3fc;
}

.footer a:hover {
    color: #bfdbfe;
}

/* Ensure list items in tutorial are readable */
.tutorial-section li {
    color: #cbd5e1;
}

/* Stronger contrast for dt/dd in description lists */
dt {
    color: #f1f5f9;
}

dd {
    color: #cbd5e1;
}
