/* Minimalistic, Compact, Conservative Design */

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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #95a5a6;
    --accent-color: #e74c3c;
    --bg-light: #f8f9fa;
    --bg-surface: #ffffff;
    --text-color: #343a40;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --font-family-base: 'Inter', system-ui, -apple-system, sans-serif;
    --header-height: 70px;
}

[data-theme="dark"] {
    --primary-color: #ecf0f1;
    --secondary-color: #bdc3c7;
    --accent-color: #e74c3c;
    --bg-light: #1a1d21;
    /* Dark background */
    --bg-surface: #212529;
    /* Card background */
    --text-color: #e9ecef;
    --text-muted: #adb5bd;
    --border-color: #2c3034;
}

body {
    background-color: var(--bg-light);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ad Placeholders */
.ad-slot {
    background-color: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ad-slot:hover {
    border-color: var(--secondary-color);
}

/* Dark Mode Card Overrides */
.card-minimal,
.poem-card,
.site-header,
.site-footer,
.sidebar-nav-link:hover,
.mobile-bottom-nav {
    background-color: var(--bg-surface) !important;
    border-color: var(--border-color) !important;
}

.offcanvas-mobile-menu {
    background-color: var(--bg-surface);
}

.sidebar-nav-link,
.nav-link,
.site-logo {
    color: var(--text-color) !important;
}

.mobile-nav-item {
    color: var(--text-muted);
}

/* Mobile Menu Overrides for Outstanding UI */
.offcanvas-mobile-menu {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.offcanvas-header .btn-close {
    opacity: 0.8;
}

.mobile-menu-link {
    display: block;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
}

.mobile-menu-link:hover {
    background-color: rgba(0, 0, 0, 0.02);
    padding-left: 25px;
    /* Subtle slide effect */
    color: var(--accent-color);
    text-decoration: none;
}

.mobile-menu-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    color: var(--secondary-color);
}

/* Navbar adjustments */
.navbar-mobile-toggle {
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--primary-color);
    padding: 5px 10px;
}

@media (max-width: 991px) {
    .site-header .container {
        display: flex;
        align-items: center;
        justify-content: center;
        /* Logo centered */
        position: relative;
    }

    .navbar-mobile-toggle-wrapper {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .user-actions-wrapper {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .logo-section {
        padding: 20px 0;
    }

    .site-logo {
        font-size: 24px;
    }
}

body {
    font-family: var(--font-family-base);
    font-size: 14px;
    /* Small text as requested */
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography Tweaks */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Layout Containers */
.container-limited {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Section */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0px;
}

.logo-section {
    padding: 40px 0 30px;
    /* Large space for logo */
    text-align: center;
}

.site-logo {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-color);
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid transparent;
}

.site-logo:hover {
    color: #000;
    text-decoration: none;
}

/* Navigation - Mega Menu */
.navbar-custom {
    padding: 0;
    justify-content: center;
    border-top: 1px solid var(--border-color);
}

.navbar-nav .nav-link {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 15px 20px !important;
    color: var(--text-color);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #000;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Mega Menu Dropdown */
.dropdown-menu.mega-menu {
    border: none;
    border-radius: 0;
    margin-top: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
    display: block;
    /* Controlled via opacity/visibility for animation */
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
    background: #fff;
}

.nav-item.dropdown:hover .dropdown-menu.mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
    /* Ensure it takes space/renders */
}

/* Mega Menu Content */
.mega-menu-title {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin-bottom: 8px;
}

.mega-menu-list a {
    color: var(--text-color);
    font-size: 13px;
    display: block;
    padding: 2px 0;
}

.mega-menu-list a:hover {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* Main Content */
.main-content {
    min-height: 60vh;
    padding: 40px 0;
}

/* Footer */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    font-size: 12px;
    color: var(--secondary-color);
    text-align: center;
}

/* Components */
.btn-compact {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 2px;
    /* Slight roundness, almost square */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.form-control-compact {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 2px;
}

/* Cards */
.card-minimal {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    transition: all 0.3s ease;
}

.card-minimal:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Mobile Sticky Menu */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    padding-bottom: env(safe-area-inset-bottom, 15px);
    /* iOS Safe Area */
    z-index: 1030;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.03);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    width: 16%;
    transition: all 0.2s ease;
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Sidebar Navigation (Desktop) */
.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background-color: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    text-decoration: none;
}

.sidebar-nav-link i {
    width: 24px;
    color: var(--secondary-color);
    font-size: 16px;
}

.sidebar-nav-link.active i {
    color: var(--accent-color);
}

/* Poem Cards - Outstanding UI */
.poem-card {
    background: #fff;
    border: none;
    /* No border for cleaner look */
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.poem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.poem-content {
    font-size: 10px;
    /* Smaller font as requested */
    line-height: 1.8;
    color: #4a5568;
    font-family: 'Inter', sans-serif;
    /* Clean font */
    position: relative;
    padding: 25px;
    white-space: pre-wrap;
    /* Respect newlines/formatting */
}

/* Interaction Actions */
.interaction-bar {
    padding: 10px 20px;
    background: #fcfcfc;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.action-btn {
    border: none;
    background: transparent;
    color: #cbd5e0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
}

.action-btn span {
    font-size: 11px;
    font-weight: 600;
}

.action-btn:hover {
    color: var(--primary-color);
}

.action-btn.active.like-btn {
    color: #e53e3e;
    /* Red for like */
}

.action-btn.active.fav-btn {
    color: #ecc94b;
    /* Yellow/Gold for favorite */
}

.action-btn i.bi-heart-fill,
.action-btn i.bi-star-fill {
    transform: scale(1.1);
}

.site-footer {
    padding-bottom: 80px;
    /* Space for mobile menu */
}