@font-face { font-family: 'font1'; src: url('https://file.garden/aXUfWdPgtglShqRb/fonts/Go%20around%20the%20books%202022.ttf')}
@font-face { font-family: 'font2'; src: url('https://file.garden/aXUfWdPgtglShqRb/fonts/Mikey.ttf')}
@font-face { font-family: 'font3'; src: url('https://file.garden/aXUfWdPgtglShqRb/fonts/imWeird.ttf')}
@font-face { font-family: 'font4'; src: url('https://file.garden/aXUfWdPgtglShqRb/fonts/SF-Pro.ttf')}

body {
    background-color: #ffeef5;
    font-family: 'font4', sans-serif;
    color: #fff;
    margin: 0;
    padding: 30px;
    background-image: url(https://i.pinimg.com/originals/f1/51/20/f151207b520ad797f25cbeecb3878459.gif);
     background-position: center; 
    background-repeat: no-repeat; 
    background-size: cover; 
    background-attachment: fixed;
}

.header-section { text-align: center; margin-bottom: 40px; }
h1 { font-family: 'font4', sans-serif; color: rgba(255, 255, 255, 0.2); font-size: 2em; margin: 0; text-shadow: 2px 2px 0px rgba(145, 99, 123, 0.63); }
.header-section p { color: #ffffffc3; font-style: italic; font-weight: lighter; margin-top: 5px; }

/* --- TWO-COLUMN LAYOUT --- */
.page-layout {
    display: grid;
    grid-template-columns: 180px 1fr; 
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start; 
}

/* --- LEFT SIDEBAR --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky; 
    top: 30px; 
}

.sidebar-title {
    font-size: 10px;
    color: #ffffffc3;
    text-transform: lowercase;
    letter-spacing: 2px;
    margin: 0 0 5px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.62);
    padding-bottom: 5px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: #ffffffc3;
    font-family: 'font4', sans-serif;
    font-weight: lighter;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 10px;
    text-align: left; 
    border-radius: 20px;
    transition: 0.2s;
}

.filter-btn:hover, .filter-btn.active {
    color: #d48ba8;
    background: rgba(255, 255, 255, 0.77);
    box-shadow: 2px 2px 0 #965879;
    transform: translateX(5px); 
}

.divider {
    height: 2px;
    background-color: transparent;
    margin: 10px 0;
}

.clean-select {
    width: 100%;
    background: transparent;
    border: 1px solid #fff;
    color: #d48ba8;
    padding: 8px;
    border-radius: 8px;
    font-family: 'font4', sans-serif;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    font-size: 0.9em;
    transition: 0.2s;
    margin-bottom: 5px;
}

.clean-select:focus, .clean-select:hover {
    background: #fff;
}

/* --- RIGHT SIDE: MEDIA GRID (Ultra Compact) --- */
.media-grid {
    display: grid;
    /* Shrunk to 115px to fit more columns and make cards smaller */
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 12px; 
    align-items: stretch;
}

/* --- THE CARD --- */
.media-card {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(212, 139, 168, 0.62); 
    border-radius: 8px;
    padding: 8px; /* Tighter padding */
    box-shadow: 2px 2px 0 #f3e1e9; /* Slightly smaller shadow */
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.media-img {
    width: 100%;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
    border: 1px solid #eee;
}

.media-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; gap: 2px; flex-direction: column;}
.media-title { font-size: 0.8em; font-weight: bold; color: #ffffffc2; margin: 0; line-height: 1.1;}
.media-type { background: rgba(255, 238, 245, 0.53); color: rgba(212, 139, 168, 0.52); font-size: 0.55em; padding: 2px 4px; border-radius: 4px; font-weight: bold; white-space: nowrap; margin-top: 2px;}

.media-meta {
    font-size: 0.55em;
    color: #a87b93;
    font-family: font4, sans-serif;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.media-meta span { background: #fafafa; border: 1px solid #eee; padding: 1px 3px; border-radius: 3px; display: inline-flex; align-items: center; gap: 2px; }

.media-rating { color: #a87b93; font-size: 0.65em; margin-bottom: 4px; letter-spacing: 1px; }

.media-review { 
    font-size: 8px; 
    line-height: 1.3; 
    color: #000000; 
    background: rgba(255, 255, 255, 0.61); 
    padding: 1px; 
    border-radius: 4px; 
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Cuts off after 2 lines instead of 3! */
    -webkit-box-orient: vertical;
    overflow:scroll; 
    margin-bottom: 6px; 
}

.read-more-link {
    display: inline-block;
    margin-top: auto; /* Forces the link to hug the bottom */
    font-size: 0.7em;
    font-family: font4, sans-serif;
    color: #ffffffc2;
    font-weight: bold;
    text-decoration: none;
    align-self: flex-start;
    transition: 0.2s;
}
.read-more-link:hover { color: #e1bec5; transform: translateX(3px); }

/* --- ADMIN --- */
.admin-btn { position: fixed; bottom: 20px; right: 20px; background: rgba(255, 255, 255, 0); border: 2px solid rgba(255, 255, 255, 0.29); color: rgba(255, 255, 255, 0.24); width: 45px; height: 45px; border-radius: 50%; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1); font-size: 18px; z-index: 100; transition: 0.2s;}
.admin-btn:hover { background: rgba(255, 183, 197, 0.21); color: rgba(255, 255, 255, 0.59); transform: scale(1.1);}

#media-admin { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; display: flex; justify-content: center; align-items: center; }
.admin-box { background: #fff; padding: 25px; border-radius: 15px; border: 3px solid #ffc1e3; width: 320px; text-align: center; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 25px rgba(0,0,0,0.2);}
.admin-box input, .admin-box textarea { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ffc1e3; border-radius: 5px; font-family: 'Quicksand'; box-sizing: border-box; outline: none;}
.admin-box input:focus, .admin-box textarea:focus { border-color: #a87b93; }
.action-btn { background: #a87b93; color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; font-weight: bold; margin: 5px; transition: 0.2s;}
.action-btn:hover { background: #a87b93; }

/* Responsive rule for smaller screens */
@media (max-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr; 
    }
    .sidebar {
        position: relative;
        top: 0;
    }
}