/* ===== Base ===== */
:root {
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --gradient-start: #1e40af;
    --gradient-end: #7c3aed;
    --card-radius: 12px;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --main-text: black;
}

[data-bs-theme="dark"] {
    --accent: #60a5fa;
    --accent-hover: #93bbfd;
    --nav-bg: rgba(33, 37, 41, 0.9);
    --nav-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --main-text: white;
}

html {
    font-size: 15px;
    min-height: 100%;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== Navigation ===== */
.main-nav {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--nav-shadow);
    padding: 0.6rem 0;
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--accent);
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
    background: var(--bs-tertiary-bg);
}

.btn-ghost {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-ghost:hover {
    background: var(--bs-tertiary-bg);
}

/* ===== Hero Section ===== */
.hero-section {
    color: var(--main-text);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '\2660 \2665 \2666 \2663';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    opacity: 0.1;
    letter-spacing: 0.2em;
    pointer-events: none;
}

.hero-section h1 {
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero-section p {
    opacity: 0.9;
    max-width: 600px;
}

/* ===== Section Headers ===== */
.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--bs-secondary-color);
    font-size: 1.05rem;
}

/* ===== Cards ===== */
.content-card {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: var(--bs-body-bg);
}

.content-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

[data-bs-theme="dark"] .content-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.content-card .card-img-top {
    height: 200px;
    object-fit: scale-down;
}

.content-card .card-body {
    padding: 1.25rem;
}

.content-card .card-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.content-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--bs-secondary-color);
}

.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--bs-border-color);
    padding: 0.75rem 1.25rem;
}

/* ===== Placeholder Image ===== */
.card-img-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    opacity: 0.7;
}

/* ===== Badges ===== */
.badge-type {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.35em 0.7em;
    border-radius: 6px;
}

.badge-website { background: #dbeafe; color: #1e40af; }
.badge-blogpost { background: #dcfce7; color: #166534; }
.badge-book { background: #fef3c7; color: #92400e; }
.badge-game { background: #e0e7ff; color: #3730a3; }

[data-bs-theme="dark"] .badge-website { background: #1e3a5f; color: #93bbfd; }
[data-bs-theme="dark"] .badge-blogpost { background: #14532d; color: #86efac; }
[data-bs-theme="dark"] .badge-book { background: #451a03; color: #fcd34d; }
[data-bs-theme="dark"] .badge-game { background: #312e81; color: #a5b4fc; }

/* ===== Difficulty Badges ===== */
.difficulty-easy {
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
    border-radius: 6px;
}

.difficulty-medium {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
    border-radius: 6px;
}

.difficulty-hard {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    border-radius: 6px;
}

[data-bs-theme="dark"] .difficulty-easy { background: #14532d; color: #86efac; }
[data-bs-theme="dark"] .difficulty-medium { background: #451a03; color: #fcd34d; }
[data-bs-theme="dark"] .difficulty-hard { background: #450a0a; color: #fca5a5; }

/* ===== Rating Stars ===== */
.rating-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-bar .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bs-border-color);
}

.rating-bar .dot.filled {
    background: var(--accent);
}

/* ===== Buttons ===== */
.btn-accent {
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    transition: background 0.2s, transform 0.15s;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
}

.btn-outline-accent {
    color: var(--accent);
    border: 1.5px solid var(--accent);
    font-weight: 500;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: white;
}

/* ===== Detail Pages ===== */
.detail-hero-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--card-radius);
    margin-bottom: 1.5rem;
}

.detail-sidebar .card {
    border-radius: var(--card-radius);
    border: 1px solid var(--bs-border-color);
}

.detail-sidebar .list-group-item {
    border: none;
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    background: transparent;
}

.blog-content, .rules-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.blog-content img, .rules-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ===== Pagination ===== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--bs-body-color);
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    color: white;
}

/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid var(--bs-border-color);
    margin-top: auto;
}

.site-footer a:hover {
    color: var(--accent) !important;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    font-size: 0.9rem;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

/* ===== Misc ===== */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.text-accent {
    color: var(--accent) !important;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--bs-secondary-color);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* ===== Focus Styles ===== */
.btn:focus-visible, .form-control:focus-visible, .form-check-input:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
