/* General */
:root {
    --background-color: #141414;
    --transition: 0.3s ease-in-out;
    --hover-bg: rgba(255, 255, 255, 0.1);
    --red-accent: #e50914;
    --color: #fff;
}

* {
    box-sizing: border-box;
}

html, body {
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #000;
    color: var(--color);
    padding-top: 80px; /* Space for fixed navbar */
}

img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.text {
    font-size: 0.6rem;
    color: white;
}
@media (min-width: 768px) and (max-width: 1023px) {
    .text { font-size: 0.8rem; }
}
@media (min-width: 1024px) {
    .text { font-size: 1rem; }
}
.text--bold {
    font-weight: 700;
    margin-right: 0.3rem;
}
.text--muted { color: grey; }
.text--white { color: white; }

/* Flexbox utils */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }


/* Navbar */
.nav-sensor {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 28px; /* small hover area */
    z-index: 1500;
    background: transparent;
}

.navbar {
    position: fixed;
    top: -84px; /* hidden until sensor hover */
    left: 0;
    right: 0;
    z-index: 1600;
    padding: 0 2rem;
    transition: top 320ms cubic-bezier(.2,.9,.2,1), box-shadow 320ms;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 30px rgba(0,0,0,0.45);
    border-bottom-left-radius: 8px;   /* added: rounded corners */
    border-bottom-right-radius: 8px;  /* added: rounded corners */
}

.nav-sensor:hover + .navbar,
.navbar:hover {
    top: 0;
}

.navbar:hover .nav-container,
.navbar:focus-within .nav-container {
    transform: translateY(-1px);
    transition: transform 220ms;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 0;
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(270deg, #ff6a00, #ffae42, #d35400, #e67e22, #ff6a00);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fallGradient 8s ease infinite;
    letter-spacing: 2px;
}
@keyframes fallGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.nav-links {
    display: flex;
    position: relative;
    gap: 0.5rem;
}
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--color);
    transition: all var(--transition);
    cursor: pointer;
    min-width: 48px;
    min-height: 48px;
}
.nav-item img {
    width: 22px;
    height: 22px;
    filter: invert(1);
    display: block;
}
.nav-item:hover {
    background-color: var(--hover-bg);
    transform: translateY(-2px);
}
.nav-item .tooltip, .icon-btn .tooltip {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--color);
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 1001;
}
.nav-item .tooltip::before, .icon-btn .tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid rgba(0, 0, 0, 0.9);
}
.nav-item:hover .tooltip, .icon-btn:hover .tooltip {
    opacity: 1;
}
.indicator {
    position: absolute;
    height: 100%;
    border-radius: 0.5rem;
    background-color: var(--color);
    mix-blend-mode: difference;
    transition: all var(--transition);
    pointer-events: none;
    opacity: 0.8;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.search-container {
    display: flex;
    align-items: center;
}
.search-input {
    width: 0;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid white;
    background: black;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: -30px; /* Hide behind button */
    pointer-events: none;
}
.search-container.active .search-input {
    width: 200px;
    opacity: 1;
    margin-left: 0;
    pointer-events: auto;
}
.icon-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--color);
    padding: 0.8rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    z-index: 2;
}
.icon-btn img {
    width: 22px;
    height: 22px;
    filter: invert(1);
    display: block;
    margin: 0 auto;
}
.icon-btn:hover {
    background-color: var(--hover-bg);
    transform: translateY(-2px);
}
.dot {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 8px;
    height: 8px;
    background-color: var(--red-accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.profile { position: relative; }
.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition);
}
.profile-btn:hover { background-color: var(--hover-bg); }
.profile-btn img.avatar {
    width: 32px;
    height: 32px;
    border-radius: 0.25rem;
    object-fit: cover;
    display: block;
}
.profile-btn img:not(.avatar) {
    width: 30px;
    height: 30px;
    filter: invert(1);
    display: block;
    margin: 0 auto;
}
.profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    z-index: 1002;
    margin-top: 0.5rem;
}
.profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.profile-menu button {
    width: 100%;
    background: none;
    border: none;
    color: var(--color);
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition);
    font-size: 0.9rem;
}
.profile-menu button:hover { background-color: var(--hover-bg); }

/* Hamburger button (mobile) */
.hamburger {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    padding: 6px;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    cursor: pointer;
}
.hamburger span {
    display: block;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Mobile nav drawer */
.nav-mobile {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(10px);
    z-index: 1100;
    padding: 12px 16px;
    transform-origin: top;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-mobile.show { display: block; }

/* Tighter card gaps for smaller screens */
@media (max-width: 1024px) {
    .cards { gap: 1.5rem; grid-auto-columns: 32%; }
}
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links { display: none; } /* keep original hidden */
    .nav-mobile { display: none; }
    .nav-mobile.show { display: block; }
    .nav-mobile .nav-item { display: flex; padding: 0.6rem 0.8rem; gap: 0.6rem; align-items: center; border-radius: 8px; }
    .cards { gap: 1rem; grid-auto-columns: 42%; }
    .wrapper { transition: none; }
}
@media (max-width: 480px) {
    .cards { gap: 1rem; grid-auto-columns: 46%; }
    .nav-mobile { top: 56px; padding: 10px; }
}

/* Hamburger active state (simple cross) */
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Ensure indicator stays behind nav mobile if shown */
.nav-mobile .indicator { display: none; }

/* Carousel arrow controls (clean, transparent) */
.carousel-controls {
    position: absolute;
    top: 8px;
    right: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 20;
    pointer-events: none; /* let children enable pointer events individually */
}
.carousel-arrow {
    pointer-events: auto;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.18s ease, transform 0.18s ease;
    filter: invert(1);
    background: transparent;
    border-radius: 50%;
}
.carousel-arrow:hover { transform: translateY(-3px); opacity: 1; }
.carousel-counter {
    pointer-events: none;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 6px;
    opacity: 0.95;
}

/* Ensure .cards container is positioned to allow absolute controls */
.cards { position: relative; }

/* Main Content & Sections */
.content {
    padding: 2rem 2rem;
}

.content-section {
    margin-bottom: 4rem;
}

.section-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem; /* Increased spacing */
}

/* Cards */
.cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 250px; /* Reduced desktop card width from 300px to 250px */
    gap: 1.5rem; /* Increased gap for tidiness */
    overflow-x: auto;
    overflow-y: hidden; /* added: prevent vertical scrollbar when cards flip/transform */
    padding-bottom: 1.5rem;
}
#search-results .cards {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-flow: initial;
}


.cards::-webkit-scrollbar {
    height: 8px;
}
.cards::-webkit-scrollbar-track {
    background: #202020;
    border-radius: 10px;
}
.cards::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

/* Remove hiding of .cards scrollbar so cards remain scrollable */

/* Hide scrollbar only for the body (Chrome, Safari and Opera) */
body::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbars for section containers */
.cards,
.cast-grid,
.similar-movies {
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}
.cards::-webkit-scrollbar,
.cast-grid::-webkit-scrollbar,
.similar-movies::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Notification panel scrollbar: transparent thumb but still scrollable */
.notification-panel {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.notification-panel::-webkit-scrollbar { width: 8px; height: 8px; }
.notification-panel::-webkit-scrollbar-track { background: transparent; }
.notification-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 8px; transition: background .18s; }
.notification-panel::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

/* Notification Panel Modern Styles */
.notification-panel {
    position: fixed;
    top: 72px;
    right: 20px;
    width: 360px;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(15, 15, 16, 0.98); /* Deeper dark background */
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    z-index: 10001;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.75);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}

.notification-header strong {
    font-size: 1.2rem;
    font-weight: 700;
}

.notification-panel .clear-notifs {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.notification-panel .clear-notifs:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
}

.notification-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.notification-item img {
    width: 64px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.notification-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notification-title {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    line-height: 1.2;
}

.notification-meta {
    font-size: 0.85rem;
    color: #bbb;
}

.notification-empty {
    color: #bbb;
    padding: 30px 20px;
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
}

/* --- Transient Notification Popups --- */

/* Container for all popups, manages stacking */
.notification-popup-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Spacing between popups */
    align-items: flex-end; /* Ensure they align right */
    max-width: 340px;
}
@media (max-width: 480px) {
    .notification-popup-container {
        right: 10px;
        left: 10px;
        align-items: center; /* Center popups on small screens */
        max-width: 100%;
    }
}


/* Popup notification (modern compact card) */
.notification-popup {
    /* Removed absolute top/right positioning */
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(180deg, rgba(18,18,18,0.95), rgba(12,12,12,0.9));
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    transform: translateX(100%); /* Start off-screen right */
    opacity: 0;
    transition: transform .28s cubic-bezier(.2,.9,.2,1), opacity .28s;
    backdrop-filter: blur(8px);
    cursor: pointer;
    width: 340px; /* Fixed width, container manages max-width */
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .notification-popup {
        width: 100%;
        max-width: 340px;
    }
}
.notification-popup.show { transform: translateX(0); opacity: 1; }
.notification-popup img { width: 56px; height: 84px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.notification-popup .meta { display:flex; flex-direction:column; gap:4px; color:#fff; }
.notification-popup .meta .title { font-weight:700; font-size:0.95rem; color:#fff; line-height:1.1; }
.notification-popup .meta .sub { font-size:0.85rem; color:#bbb; }
.notification-popup .close-x { margin-left: 8px; color:#bbb; font-weight:700; font-size:1rem; flex-shrink: 0;}

.wrapper {
    position: relative;
    /* Use max-width based on column size to prevent stretching */
    width: 100%; 
    /* Maintain a good aspect ratio for movie posters (approx 2:3) */
    aspect-ratio: 2/3; 
    transition: transform 0.3s ease, z-index 0s 0.15s;
    min-height: 250px; 
    overflow: hidden; 
    transform-style: preserve-3d; 
    -webkit-transform-style: preserve-3d;
    cursor: pointer; 
}

/* Card Flip Styles */
.wrapper {
    perspective: 1000px; /* needed for 3D effect */
}
.wrapper:hover {
    z-index: 50; /* Bring hovered card forward */
}
.card {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.wrapper__front {
    transform: rotateY(0deg);
    z-index: 2;
}
.wrapper__back {
    transform: rotateY(180deg);
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.wrapper:hover .wrapper__front {
    transform: rotateY(-180deg);
}

.wrapper:hover .wrapper__back {
    transform: rotateY(0deg);
}

/* Card content styling for modern look */
.card {
    overflow: hidden;
    background: rgba(255,255,255,0.02); /* more translucent glass */
    border: 1px solid rgba(255,255,255,0.04); /* softer, lighter outline */
    backdrop-filter: blur(14px) saturate(120%); /* stronger glass blur */
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45); /* softer, less opaque shadow */
    width: 100%;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.card--rounded { border-radius: 10px; }
.card__header { 
    width: 100%; 
    height: 100%;
    position: relative; /* Needed for progress bar positioning */
}
.wrapper__back .card__header { height: 55%; background: transparent; }
/* --- Progress Bar Styles --- */
.progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6a00, #ffae42);
    transition: width 0.5s ease;
    border-radius: 0 3px 3px 0;
}
/* --- End Progress Bar Styles --- */

.card__body {
    padding: 0.7rem 1rem 0.8rem 1rem; /* Adjusted vertical padding for tighter fit */
    height: 45%; /* ensure body takes remaining space */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Use a very subtle, slightly darker glass background for the body */
    background: rgba(0,0,0,0.4); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.05);
    box-shadow: none;
    flex: 1 1 auto;
}
.card__body-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-start; /* Start elements from the top */
    gap: 6px; /* Reduced gap slightly for compactness */
}

.card__title {
    order: -1; /* Place title at the top of the flex container */
    color: white;
    margin-top: 0;
    font-size: 1.1em;
    font-weight: bold;
    line-height: 1.2;
}
.card__overview {
    font-size: 0.75em;
    color: #ccc;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 0; /* Set clamp to 0 or remove entirely */
    -webkit-box-orient: vertical;
    margin-top: 0; /* Adjust margin since text is removed */
    display: none; /* Hide the overview text entirely */
}

/* New: Progress Label below Title */
.card__progress-label {
    order: 0; /* Place progress label below title */
    font-size: 0.85em;
    font-weight: 600;
    color: #ffae42;
    margin: 0;
    line-height: 1.2;
    margin-bottom: 2px; /* Reduced space below progress label */
}
.card__progress-label.movie {
    color: #4ade80; /* Green for movie continuation */
}


/* New: Card Tag Styles (Genres) */
.card__tags {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px; /* Added space below tags before action buttons */
    padding: 6px 8px; /* Slightly reduced vertical padding */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    align-self: flex-start;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    order: 1; /* Place tags after title/progress */
}
.card__tags .tags-icon {
    width: 14px;
    height: 14px;
    filter: invert(1);
    opacity: 0.7;
    flex-shrink: 0;
}
.card__tags .tags-text {
    font-size: 0.7em;
    font-weight: 500;
    color: #eee;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* New: Separating info from actions */
.card__body-content > .flex {
    flex-shrink: 0; /* Prevent action row from shrinking */
    margin-top: auto; /* Push the action row to the bottom of the content area */
}


/* FIXED: Buttons - Better centering and alignment */
.btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0;
}
.btn {
    border: 2px solid rgba(255,255,255,0.4); /* Softer border */
    text-decoration: none;
    transition: all 250ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3); /* Subtle dark background for buttons */
    backdrop-filter: blur(4px);
    position: relative; /* needed for icon positioning */
}
.btn--circle { 
    border-radius: 50%; 
    width: 40px; /* Apply fixed size here */
    height: 40px; /* Apply fixed size here */
}
.btn i {
    font-size: 1.1rem; /* Slightly larger icon */
    color: white;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* initial state for standard stroke icons */
    z-index: 1; 
}

/* New: Checkmark Badge Icon Styling */
.add-btn .add-icon {
    display: block; /* stroke icon */
}
.add-btn .check-icon {
    display: none; /* hidden by default */
    width: 20px;
    height: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.add-btn.in-list {
    border-color: #4ade80; /* Green border when active */
    background: rgba(74, 222, 128, 0.4); /* Subtle green background, slightly stronger opacity */
}

.add-btn.in-list .add-icon {
    display: none;
}
.add-btn.in-list .check-icon {
    display: block; /* Show checkmark when active */
}


.btn:hover {
    background: rgba(255,255,255,0.2); /* Lighter background on hover */
    border-color: white;
    transform: scale(1.05); /* slightly reduced scale */
}
.btn:hover i {
    color: white; /* Keep icon white on hover against lighter background */
}

/* Cleanup old specific button overrides */
.add-btn .hgi-check { /* REMOVED */
    color: #4ade80 !important; 
}
.add-btn:hover .hgi-check {
    color: white !important; /* ensure white on hover */
}

/* Action Buttons (Refined) */
.anime-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0;
}

.anime-actions .btn {
    /* Override size/padding to fit text */
    height: 40px; 
    padding: 8px 15px; 
    border-radius: 8px; 
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    flex-shrink: 0;
    width: auto; /* Ensure it expands to fit content */
    
    /* Remove redundant core styling to rely on style.css .btn properties, but keep what style.css doesn't define */
    
    /* Ensure primary button gets a solid background (it overrides style.css .btn background) */
}

.anime-actions .btn-primary {
    /* Overrides base background/border from style.css .btn */
    background: linear-gradient(135deg, #ff6a00, #d35400); /* Corridor Orange (Watch) */
    color: white;
    border: none; /* Remove border for primary button */
    backdrop-filter: none; /* Remove backdrop filter for solid color primary btn */
    box-shadow: 0 4px 10px rgba(255, 106, 0, 0.3); 
}

.anime-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 106, 0, 0.4);
}

.anime-actions .btn-secondary {
    /* Secondary button uses the base glass look from style.css .btn */
    color: white; /* Ensure text is visible */
    border: 2px solid rgba(255, 255, 255, 0.4); /* Explicitly keep the base border */
    background: rgba(0, 0, 0, 0.3); 
    backdrop-filter: blur(4px); 
}

.anime-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
    border-color: #fff;
}


/* Responsive */
@media (max-width: 1024px) {
    .navbar { padding: 0 2rem; }
    .content { padding: 2rem; }
    .nav-links { display: none; } /* Hide text links on smaller screens */
    .cards { grid-auto-columns: 30%; } /* Adjusted from 28% to 30% for proportional size adjustment */
    .content-section {
        min-height: 350px;
    }
    .cards {
        grid-auto-columns: 30%; /* Adjusted from 28% to 30% */
        min-height: 200px;
    }
    .wrapper {
        min-height: 200px;
    }
}
@media (max-width: 768px) {
    body { padding-top: 60px; }
    .navbar { padding: 0 1rem; top: -72px; }
    .nav-sensor { height: 22px; }
    .nav-container { padding: 0.5rem 0; }
    .nav-left { gap: 1rem; }
    .search-container.active .search-input { width: 150px; }
    .cards { grid-auto-columns: 40%; } /* Adjusted from 42% to 40% for consistency */
    .content-section {
        min-height: 300px;
    }
    .cards {
        grid-auto-columns: 40%; /* Adjusted from 42% to 40% */
        min-height: 200px; /* Increased min-height for better aspect ratio */
    }
    .wrapper {
        min-height: 200px;
    }
    .icon-btn img, .nav-item img {
        width: 20px;
        height: 20px;
    }
    .card__title { font-size: 1em; } /* Adjust font size down slightly for smaller screens */
}
@media (max-width: 480px) {
    .navbar { padding: 0 1rem; }
    .logo { font-size: 1.5rem; }
    .nav-right { gap: 0.5rem; }
    .icon-btn, .profile-btn {
        padding: 0.6rem;
        min-width: 40px;
        min-height: 40px;
    }
    .icon-btn img, .nav-item img { 
        width: 18px; 
        height: 18px; 
    }
    .cards { grid-auto-columns: 45%; } /* Adjusted from 46% to 45% */
    .content { padding: 1rem; }
    .content-section {
        min-height: 280px;
    }
    .cards {
        grid-auto-columns: 45%; /* Adjusted from 46% to 45% */
        min-height: 180px; /* Increased min-height */
    }
    .wrapper {
        min-height: 180px;
    }
    .notification-panel {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        top: 60px;
        max-height: 85vh;
    }
    .notification-header {
        padding: 0 4px 10px 4px;
    }
    .notification-item {
        gap: 12px;
        padding: 10px;
    }
    .notification-item img {
        width: 50px;
        height: 75px;
    }
}

/* --- New Hero Slider Styles --- */
.hero-slider-section {
    max-width: 1200px;
    margin: 0 auto 4rem; /* Center the slider and add space below */
    padding: 0 1rem;
}

.slider-container {
    position: relative;
    overflow: hidden;
    height: 40vw; /* Responsive height based on width */
    max-height: 550px;
    border-radius: 8px; /* 8px rounded slider */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end; /* Align content to the bottom */
}

.slider-slide.active {
    opacity: 1;
}

.slide-backdrop {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: absolute;
    z-index: 1;
}

.slide-gradient {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* Darken bottom area for readability of text/controls */
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.slide-content {
    position: relative;
    z-index: 3;
    padding: 3rem;
    max-width: 70%;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.slide-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    color: white;
}

.slide-overview {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #ddd;
    margin-bottom: 1.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.slide-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.slide-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1;
}

.slide-btn--play {
    background: white;
    color: #000;
    border: 2px solid white;
}
.slide-btn--play:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 255, 255, 0.2);
}

.slide-btn--detail {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}
.slide-btn--detail:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.slide-btn img {
    width: 20px;
    height: 20px;
    filter: none; /* Reset filter for the SVG icons */
}

/* Slider Dots */
.slider-controls {
    text-align: center;
    margin-top: 1.5rem;
}
.slider-dots {
    display: inline-flex;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}
.dot.active {
    width: 24px; /* expand on active */
    border-radius: 10px;
    background-color: white; /* fill */
}

@media (max-width: 768px) {
    .slider-container {
        height: 60vw;
        max-height: 350px;
    }
    .slide-content {
        padding: 1.5rem;
        max-width: 100%;
    }
    .slide-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    .slide-overview {
        -webkit-line-clamp: 2;
    }
    .slide-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .slide-btn img {
        width: 18px;
        height: 18px;
    }
}

/* --- Calendar Section Styles --- */
#calendar-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
    object-fit: contain;
}
.calendar-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.calendar-item {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease;
    cursor: pointer;
}
.calendar-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    background: rgba(255, 255, 255, 0.08);
}
.calendar-item img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    line-height: 1.2;
}
.item-meta {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 8px;
}
.item-time {
    font-size: 1rem;
    font-weight: 600;
    color: #4ade80; /* Green accent for time */
}