#movie {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.movie-hero {
    border-radius: .75rem;
    margin-inline: 1.5rem;
    position: relative;
    height: 40vh;
    min-height: fit-content;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-backdrop {
    display: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;

}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 50px;
    align-items: flex-start;
    padding: 2.5rem;
    width: 100%;
    max-width: 1280px;
}

.movie-poster-container {
    position: relative;
    flex-shrink: 0;
}

.movie-poster {
    width: 350px;
    height: 525px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.movie-poster:hover {
    transform: scale(1.05);
}


.rating-badge {
    background: rgba(255, 193, 7, 0.9);
    backdrop-filter: blur(10px);
    padding-top: .375rem;
    padding-bottom: .375rem;
    padding-left: .75rem;
    padding-right: .75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #000;
}

.rating-star {
    font-size: 18px;
}

.rating-value {
    font-size: 16px;
}

.movie-main-info {
    flex: 1;
}

.hat-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hat-main-info>div:first-child {
    flex: 1;
}

.hat-main-info>div:last-child {
    flex-shrink: 0;
}


.movie-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1;

}

.movie-meta {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.movie-meta span {
    padding-top: .375rem;
    padding-bottom: .375rem;
    padding-left: .75rem;
    padding-right: .75rem;
    background-color: #00000080;
    border-radius: 9999px;
    gap: .5rem;

    font-weight: 400;
    font-size: 14px;
}

.rating-badge span {
    font-weight: 800;
    background: transparent;
    padding: 0;
    font-size: 15px;
}

.genre-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.genre-tag {
    background: #64748b99;
    padding-left: .75rem;
    padding-right: .75rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
    border-radius: 9999px;
    font-size: .875rem;
    font-weight: 500;
    color: white;
}


.movie-plot {
    font-size: 16px;
    line-height: 1.4;
    max-width: 56rem;
    color: #e2e8f0;
}

.movie-details {
    padding: 20px 60px 60px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.detail-card h3 {
    font-size: .875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-card span {
    font-size: 1.0rem;
}

.detail-card p {
    font-size: 0.75rem;
    line-height: 1;
    margin-block: 0;
    color: #cbd5e0;
}

.hero-recommendations {
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-recommendations h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-align: left;
}


.note-about {
    margin: 0;
    line-height: 1.5rem;
    font-size: .875rem;
    padding: 1rem;
    background-color: #ffffff25;
    border-color: #ff9900d8;
    border-style: solid;
    border-width: 0 0 0 4px;
    border-radius: 0 0.5rem 0.5rem 0;
}



.holder-carousel {
    position: relative;
    width: 100%;
    border-radius: 0.75rem;
    padding: 1.5rem; /* só vertical */
}

.carousel-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    width: max-content;
}

.carousel-slide {
    flex-shrink: 0;
    width: 150px;
}

.card-title-below {
    text-align: start;
    margin-top: 6px;
    font-size: 0.775rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    font-weight: 500;
    margin-bottom: 0;
}

.carousel-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.3s ease;
}

.carousel-card img {
    border-radius: 0.75rem;

    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.carousel-card:hover {
    transform: scale(1.02);
}

.card-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-card:hover .card-info-overlay {
    opacity: 1;
}

.card-info-overlay h4 {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.card-info-overlay p {
    font-size: 14px;
    margin-bottom: 5px;
}

.card-rating {
    color: #f59e0b !important;
    font-weight: 600;
}

.card-genres {
    color: #6b7280 !important;
    font-style: italic;
}

.card-year {
    color: #4b5563 !important;
    font-weight: 500;
}

.recommendations-section {
    padding: 60px;
    background: rgba(0, 0, 0, 0.2);
    margin-top: 40px;
    display: none;
}

.action-section {
    padding: 1.5rem;
    padding-bottom: 2rem;
}

.action-btn {
    color: #fff;
    padding-top: .5rem;
    padding-bottom: .5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    gap: .5rem;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
}

.action-btn:hover {
    color: hsl(var(--accent-foreground));
    background-color: #fff3;
}

.movie-meta span .material-symbols-outlined {
    all: unset;
    font-family: 'Material Symbols Outlined';
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
    margin-right: 6px;
}

.movie-page-topbar {
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #222;
    z-index: 10;
    position: relative;
}

.movie-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.movie-brand-logo {
    height: 36px;
}

.movie-brand-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.3px;
}

.details-grid.inside-hero {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

#history-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .25);
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, .2);
    color: white;
    padding: 8px 14px;
    border-radius: 10px 0px;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
}

#history-toggle:hover {
    background: rgba(255, 255, 255, .18);
}

#history-toggle .material-symbols-outlined {
    transition: transform 0.4s ease;
}

#history-toggle.open .material-symbols-outlined {
    transform: rotate(-180deg);
}

#history-card {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 500px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    display: none;
    z-index: 998;
    color: #fff;
}

#history-card h4 {
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

#history-list {
    max-height: 250px;
    overflow-y: auto;
}

.history-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.history-entry:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 5px;
}

.history-entry img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.grid-divisor {
    grid-template-columns: 65% 32%;
    display: grid;
    gap: 2.5rem;
}


.unclicked-items {
    display: flex;
    flex-wrap: wrap;
    padding: 1rem;
    justify-content: flex-start;
}

.unclicked-card-wrapper {
    width: 119px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.7rem;
    color: #ffffff;
}

.unclicked-card {
    width: 48px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.unclicked-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.unclicked-card:hover {
    transform: scale(1.00);
}

.unclicked-title {
    margin-top: 10px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 4px;
}

.unclicked-year {
    color: #e2e8f0;
    font-size: 0.7rem;
}


.history-session {
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 625px;
    overflow-y: auto;
}

.history-note {
    line-height: 1rem;
    margin-bottom: 1.5rem;
}

.history-note .primary {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 15.5rem;
}

.history-note .secondary {
    font-size: 12px;
    color: #fca037;
    font-weight: 400;
}

.history-block {
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.history-block:hover {
    background: rgba(255, 255, 255, 0.06);
}

.history-block img {
    width: 48px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.history-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.history-title {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.2;
}

.history-year {
    font-size: 14px;
    color: #c3cdda;
    margin-top: 2px;
}

.actual-movie {
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.actual-movie .history-block {
    padding: 1rem;
    background-color: #ffffff26;
    border-color: #fff6;
    border-width: 2px;
    gap: 1rem;
    align-items: center;
    display: flex
}

.actual-movie .history-block p {
    margin: 0;
    line-height: 1rem;
    font-size: .75rem;
    background-color: #ffffff0f;
    border-color: #ffffff6c;
    border-style: solid;
    border-width: 0 0 0 2px;
    color: #fff9;
    border-radius: 5px;
    padding: 0.5rem;
}

.viz-container {
    background-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(1rem);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin: 1.5rem;
}

.viz-content {
    display: grid;
    grid-template-columns: 45% 52%;
    gap: 2rem;
    align-items: center;
}

.viz-graph {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.10);
}


.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 200px;
    background: transparent;
    backdrop-filter: blur(8px);
    color: #ff5500;
    border: none;
    margin-inline: 2px;
    border-radius: 0.4rem;
    transition: background 0.3s ease;
}


.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.carousel-btn.prev {
    left: 0; 
}

.carousel-btn.next {
    right: 0;
}