/* ===========================================
   Side rails (Quick Wheels / Guides) + Tips bar
   These fill the spaces formerly reserved for ads.
   Grid placement + collapse rules live in index.css.
   =========================================== */

/* --- Rails share the <aside> look; tighten for the 160px column --- */
.side-rail {
    padding: 16px 10px; /* vertical padding must match <aside> (16px) or the rail ends up shorter than the panels */
    overflow: hidden; /* height rules are shared with the panels in index.css */
    min-width: 0;
}

    .side-rail h2 {
        font-size: 0.95rem;
        padding-right: 30px; /* clear the collapse toggle */
        margin: 0 0 10px;
        white-space: nowrap;
    }

.rail-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 4px 2px 2px;
    scrollbar-width: thin;
    scrollbar-color: #2979ff transparent;
}

/* --- Quick Wheels --- */
.quick-wheel,
.guide-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 6px;
    background: #0d1422;
    border: 1px solid #2979ff;
    border-radius: 8px;
    color: #e5eefc;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    flex: 0 0 auto;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

    .quick-wheel:hover,
    .guide-card:hover,
    .quick-wheel:focus-visible,
    .guide-card:focus-visible {
        border-color: #7fff00;
        box-shadow: 0 0 8px rgba(127, 255, 0, 0.6);
        transform: translateY(-1px);
        outline: none;
    }

    .quick-wheel img {
        width: 100%;
        height: 64px;
        object-fit: cover;
        border-radius: 4px;
        display: block;
    }

/* --- Guides: crop the tall thumbnails to their title area --- */
.guide-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    object-position: top;
    border-radius: 4px;
    display: block;
}

.rail-more {
    flex: 0 0 auto;
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #7fff00;
    text-decoration: none;
}

    .rail-more:hover {
        text-decoration: underline;
    }

/* --- Bottom tips bar (fixed, like the old #bottom-ad) --- */
#tips-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    background: #000;
    border-top: 2px solid #39ff14;
    box-shadow: 0 0 6px #39ff14, 0 0 12px #39ff14;
    color: #e5eefc;
    font-size: 0.95rem;
    z-index: 50;
}

    #tips-bar .tips-label {
        color: #7fff00;
        font-weight: 800;
        white-space: nowrap;
        text-shadow: 0 0 6px #7fff00;
    }

    #tips-bar .tips-list {
        list-style: none;
        margin: 0;
        padding: 0;
        flex: 1 1 auto;
        min-width: 0;
    }

        #tips-bar .tips-list li {
            display: none;
            line-height: 1.3;
        }

            #tips-bar .tips-list li.active {
                display: block;
            }

        #tips-bar .tips-list strong {
            color: #fff;
        }

        #tips-bar .tips-list a {
            color: #4da3ff;
            font-weight: 700;
            margin-left: 6px;
            white-space: nowrap;
        }

    #tips-bar .tips-next,
    #tips-bar .tips-toggle {
        flex: 0 0 auto;
        width: 28px;
        height: 28px;
        background: #2979ff;
        color: #fff;
        border: none;
        border-radius: 4px;
        font-weight: bold;
        font-size: 1rem;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 0 6px #2979ff;
    }

        #tips-bar .tips-next:hover,
        #tips-bar .tips-toggle:hover {
            background: #1e5ed6;
        }

/* Collapsed tips bar: thin strip with just the toggle */
body.tips-collapsed {
    padding-bottom: 34px;
}

    body.tips-collapsed #tips-bar {
        height: 30px;
        justify-content: flex-end;
    }

        body.tips-collapsed #tips-bar .tips-label,
        body.tips-collapsed #tips-bar .tips-list,
        body.tips-collapsed #tips-bar .tips-next {
            display: none;
        }

        body.tips-collapsed #tips-bar .tips-toggle {
            width: 22px;
            height: 22px;
            font-size: 0.85rem;
        }

/* Mobile layout has its own UI; no rails or tips bar there */
@media (max-width: 900px) {
    #tips-bar {
        display: none;
    }
}
