/* ==============================
    MAIN WRAPPER
============================== */
.wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 20px auto; /* adds vertical breathing room */

    display: flex;
    flex-direction: column;

    padding: 20px;

    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);

    border-radius: 12px; /* subtle polish */
    
    backdrop-filter: blur(2px); /* subtle modern effect */
}

.site-main {
    padding: 20px 0;
    min-height: 60vh; /* keeps page from feeling short */
}

/* =========================
   MAIN 3-COLUMN LAYOUT
========================= */

/* Base layout */
.layout {
    display: flex !important;
    gap: 20px;
}

.col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* =========================
   VARIANT: 40/40/20
========================== */
.layout-3col-25 .col.left {
    flex: 1;
}

.layout-3col-25 .col.middle {
    flex: 1;
}

.layout-3col-25 .col.right {
    flex: 0.5;
    position: sticky;
    top: 20px;
}

/* =========================
   VARIANT: 75/25
========================== */
.layout-2col-75-25 {
    display: flex;
    gap: 20px;
}

/* LEFT (flexible) */
.layout-2col-75-25 .col.left {
    flex: 1;
    min-width: 0;
}

/* RIGHT (fixed sidebar) */
.layout-2col-75-25 .col.right {
    flex: 0 0 260px; /* MATCH your sidebar width */
}

/* =========================
   VARIANT: 25/50/25
========================== */
.layout-3col-25-50-25 .col.left {
    flex: .5;
}

.layout-3col-25-50-25 .col.middle {
    flex: 1;
}

.layout-3col-25-50-25 .col.right {
    flex: .5;
    position: sticky;
    top: 20px;
}

/* =========================
   MOVIE LIST
========================= */

.movie-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movie-row {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 8px;
    border-radius: 8px;
    text-decoration: none;

    transition: all 0.2s ease;
}

.movie-row:hover {
    background: rgba(0,0,0,0.05);
}

.movie-row img {
    flex-shrink: 0;
}

.movie-row-info {
    display: flex;
    flex-direction: column;
}

.movie-row-title {
    font-weight: 600;
    color: #111;
}

.movie-row-year {
    font-size: 0.85rem;
    color: #777;
}

.source-icon {
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
}

/* =========================
   VIEW TOGGLE
========================= */

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.view-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;

    background: rgba(0,0,0,0.05);
    cursor: pointer;
}

.view-btn.active {
    background: #c9a21a;
    color: #fff;
}

/* =========================
   LIST VIEW (DEFAULT)
========================= */

.movie-list.list-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =========================
   GRID VIEW
========================= */

.movie-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.movie-list.grid-view .movie-row {
    flex-direction: column;
    text-align: center;
    padding: 0;
    background: none;
}

.movie-list.grid-view .movie-row:hover {
    background: none;
}

.movie-list.grid-view img {
    width: 100%;
    max-width: 140px;
}

.movie-list.grid-view .movie-row-info {
    margin-top: 6px;
}

.movie-list.grid-view .movie-row-title {
    font-size: 0.9rem;
}

/* =========================
   PAGINATION
========================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.page-link,
.page-nav {
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;

    font-size: 0.9rem;
    color: #444;
    background: rgba(0,0,0,0.05);

    transition: all 0.2s ease;
}

.page-link:hover,
.page-nav:hover {
    background: rgba(0,0,0,0.1);
}

.page-link.active {
    background: #c9a21a;
    color: #fff;
    font-weight: 600;
}