/* Home Page Styles */
.home-container {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 2rem 1.5rem;
    padding-top: 8rem; /* Add space for navbar */
    padding-bottom: 0.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.home-greeting {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    text-align: left;
    letter-spacing: -0.01em;
}

.recently-watched-section {
    width: 100%;
    margin-bottom: 3rem;
}

.recently-watched-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.recently-watched-title {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    transition: color 0.2s ease;
    cursor: pointer;
}

.recently-watched-title:hover {
    color: var(--text-secondary);
}

.recently-watched-see-all {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s ease;
    cursor: pointer;
}

.recently-watched-see-all:hover {
    color: var(--text-secondary);
}

.recently-watched-see-all i {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.recently-watched-see-all:hover i {
    transform: translateX(2px);
}

.recently-watched-swiper {
    width: 100%;
    overflow: hidden;
}

.recently-watched-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    width: 100%;
    gap: 8px;
}

.recently-watched-cards {
    display: flex;
    width: 100%;
}

.recently-watched-swiper:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - 16px) / 3);
    height: auto;
    display: flex;
    flex-shrink: 0;
}

.recently-watched-swiper.swiper-initialized .swiper-wrapper {
    gap: 0;
}

.recently-watched-swiper.swiper-initialized .swiper-slide {
    width: auto;
}

.recently-watched-swiper .swiper-slide .recent-film-card {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.recent-film-card {
    background: var(--card-bg);
    border: 0.5px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    clip-path: inset(0 round 12px);
    mask-image: radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .recent-film-card:hover {
        background: var(--card-hover-bg);
        border-color: var(--card-hover-border);
        transform: translateY(-2px);
    }
}

/* Glimmer/shine overlay (positioned by JS via --mx/--my) */
.recent-film-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.35),
        rgba(255, 255, 255, 0) 55%
    );
    opacity: 0;
    transition: opacity 0.15s ease;
    mix-blend-mode: screen;
    pointer-events: none;
}

.recent-film-card.is-tilting {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.recent-film-card.is-tilting::after {
    opacity: 1;
}

.recent-film-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--surface-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: inherit;
    position: relative;
}

.recent-film-card-poster {
    will-change: transform;
}

.recent-film-card.is-tilting .recent-film-card-poster {
    transform: translateZ(28px);
}

.recent-film-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.recent-film-card-placeholder {
    color: var(--text-tertiary);
    font-size: 2rem;
}

.recent-film-card-loading {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-primary);
}

.recent-film-card-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--surface-border);
    border-top-color: var(--text-primary);
}

@keyframes shimmer {
    0% {
        background-position: -300% 0;
    }
    50% {
        background-position: 300% 0;
    }
    100% {
        background-position: -300% 0;
    }
}

/* Add Film Section */
.add-film-section {
    width: 100%;
    margin-bottom: 3rem;
}

.add-film-container {
    background: var(--card-bg);
    border: 0.5px solid var(--card-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.add-film-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 30%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.15) 70%,
        transparent 100%
    );
    animation: containerShine 5s ease-in-out infinite;
    pointer-events: none;
    transform: skewX(-20deg);
}

@keyframes containerShine {
    0% {
        left: -100%;
    }
    100% {
        left: 150%;
    }
}

/* Light theme: Adjust shimmer effect for visibility on light backgrounds */
:root[data-theme="light"] .add-film-container::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 0, 0, 0.06) 30%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.06) 70%,
        transparent 100%
    );
}

/* System preference light mode fallback for shimmer */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .add-film-container::before {
        background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(0, 0, 0, 0.06) 30%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.06) 70%,
            transparent 100%
        );
    }
}

.add-film-title {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    text-align: center;
}

.add-film-subheading {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0 0 2rem 0;
    text-align: center;
    font-weight: 400;
}

.add-film-button {
    display: inline-block;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

.add-film-button:hover {
    background: var(--btn-primary-hover);
}

/* Dark theme: Make add-film-container clearly separated */
:root[data-theme="dark"] .add-film-container {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Light theme: Make add-film-container more visible */
:root[data-theme="light"] .add-film-container {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* System preference fallbacks when no explicit theme set */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .add-film-container {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .add-film-container {
        background: rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(0, 0, 0, 0.12);
    }
}

/* Monthly Highlight Section */
.monthly-highlight-section {
    width: 100%;
    margin-bottom: 3rem;
}

.monthly-highlight-title-section {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

.monthly-highlight-swiper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.monthly-highlight-swiper .swiper-wrapper {
    display: flex;
    width: 100%;
}

.monthly-highlight-swiper .swiper-slide {
    width: 100%;
    height: auto;
    display: flex;
    flex-shrink: 0;
}

.monthly-highlight-swiper .swiper-slide .monthly-highlight-card {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

/* Monthly Highlight Pagination */
.monthly-highlight-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    position: relative;
    width: 100%;
}

.monthly-highlight-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    opacity: 1;
    flex-shrink: 0;
}

.monthly-highlight-pagination-bullet-active {
    background: var(--text-primary);
    transform: scale(1.3);
    width: 8px;
    height: 8px;
}

.monthly-highlight-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease;
    border: 0.5px solid var(--card-border);
}

@media (hover: hover) and (pointer: fine) {
    .monthly-highlight-card:hover {
        border-color: var(--card-hover-border);
    }

    .monthly-highlight-card:hover .monthly-highlight-overlay {
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.98) 0%,
            rgba(0, 0, 0, 0.92) 30%,
            rgba(0, 0, 0, 0.85) 50%,
            rgba(0, 0, 0, 0.7) 70%,
            rgba(0, 0, 0, 0.4) 85%,
            transparent 100%
        );
    }
}

.monthly-highlight-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.monthly-highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.9) 30%,
        rgba(0, 0, 0, 0.8) 50%,
        rgba(0, 0, 0, 0.6) 70%,
        rgba(0, 0, 0, 0.3) 85%,
        transparent 100%
    );
    pointer-events: none;
}

.monthly-highlight-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    z-index: 1;
}

.monthly-highlight-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    min-width: 0; /* Allow flex items to shrink */
}

.monthly-highlight-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    flex: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0; /* Allow text truncation in flex container */
}

.monthly-highlight-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.monthly-highlight-rating {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.monthly-highlight-rating i {
    color: #fbbf24;
    font-size: 0.7rem;
}

.monthly-highlight-rating:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.monthly-highlight-date {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.monthly-highlight-date:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Light theme: Make rating and date pills glassy to blend with image */
:root[data-theme="light"] .monthly-highlight-rating,
:root[data-theme="light"] .monthly-highlight-date {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] .monthly-highlight-rating:hover,
:root[data-theme="light"] .monthly-highlight-date:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* System preference light mode fallback for pills */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .monthly-highlight-rating,
    :root:not([data-theme]) .monthly-highlight-date {
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 0.5px solid rgba(255, 255, 255, 0.4);
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }

    :root:not([data-theme]) .monthly-highlight-rating:hover,
    :root:not([data-theme]) .monthly-highlight-date:hover {
        background: rgba(255, 255, 255, 0.35);
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }
}

/* At a Glance Section */
.at-a-glance-section {
    width: 100%;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
}

.at-a-glance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.at-a-glance-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-align: left;
}

.at-a-glance-year-selector-wrapper {
    display: flex;
    align-items: center;
}

.at-a-glance-year-selector {
    background: var(--card-bg);
    border: 0.5px solid var(--card-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: var(--select-arrow);
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.at-a-glance-year-selector:hover {
    background-color: var(--card-hover-bg);
    border-color: var(--card-hover-border);
}

.at-a-glance-year-selector:focus {
    outline: none;
    background-color: var(--card-hover-bg);
    border-color: var(--surface-border-strong);
}

.at-a-glance-year-selector option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.at-a-glance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.at-a-glance-tile {
    background: var(--card-bg);
    border: 0.5px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.at-a-glance-tile-loading {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(
        90deg,
        var(--shimmer-base) 0%,
        var(--shimmer-highlight) 50%,
        var(--shimmer-base) 100%
    );
    background-size: 300% 100%;
    animation: shimmer 3.5s ease-in-out infinite;
    pointer-events: none;
}

.at-a-glance-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.at-a-glance-director-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.at-a-glance-director-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-secondary);
}

.at-a-glance-director-name {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.at-a-glance-number {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.at-a-glance-loading {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.at-a-glance-button {
    display: block;
    width: 100%;
    background: var(--card-bg);
    border: 0.5px solid var(--card-border);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.at-a-glance-button:hover {
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
}

/* Light theme: Add clear black border to View Full Wrapped button */
:root:not([data-theme="dark"]) .at-a-glance-button {
    border: 1px solid rgba(0, 0, 0, 0.8);
}

:root:not([data-theme="dark"]) .at-a-glance-button:hover {
    border-color: #000000;
}

.recently-watched-empty-state {
    background: var(--card-bg);
    border: 0.5px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    width: 100%;
}

.recently-watched-empty-text {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.recently-watched-empty-link {
    color: var(--text-primary);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.recently-watched-empty-link:hover {
    color: var(--text-secondary);
}

.at-a-glance-empty-state {
    margin-bottom: 1.5rem;
}

.at-a-glance-empty-tile {
    background: var(--card-bg);
    border: 0.5px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.at-a-glance-empty-text {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.home-title {
    font-family: var(--primary-font);
    font-size: 3rem;
    font-weight: 700;
    font-variation-settings: 'wght' 700;
    color: var(--text-primary);
    margin: 4rem 0 4rem;
    text-align: center;
    letter-spacing: -0.03em;
}

.home-tiles {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: center;
    margin-top: 2rem;
}

.home-tile {
    background: var(--card-bg);
    border: 0.5px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.home-tile:hover {
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
}

.home-tile.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.home-tile.disabled:hover {
    transform: none;
    background: var(--card-bg);
    border-color: var(--card-border);
}

.tile-icon {
    font-size: 2rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.tile-content {
    flex: 1;
    min-width: 0;
}

.tile-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.tile-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.tile-arrow {
    font-size: 1.25rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.home-tile:hover .tile-arrow {
    transform: translateX(4px);
    color: var(--text-secondary);
}

.home-tile.disabled .tile-arrow {
    opacity: 0.3;
}

/* Home Button and Profile Selector are styled in profile.css */

/* Responsive */
@media (min-width: 768px) {
    .home-greeting {
        font-size: 1.125rem;
    }

    .recently-watched-title {
        font-size: 1.75rem;
    }

    .recently-watched-header {
        margin-bottom: 2rem;
    }

    .recently-watched-see-all {
        font-size: 0.9375rem;
    }

    .recently-watched-see-all i {
        font-size: 0.9375rem;
    }

    .recently-watched-swiper {
        overflow: hidden;
    }

    .add-film-container {
        padding: 4rem 3rem;
    }

    .add-film-title {
        font-size: 2rem;
    }

    .add-film-subheading {
        font-size: 1.125rem;
    }

    .add-film-button {
        font-size: 1.125rem;
        padding: 1rem 2.5rem;
        max-width: 250px;
    }

    .monthly-highlight-content {
        padding: 2rem;
    }

    .monthly-highlight-title-section {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .monthly-highlight-title {
        font-size: 3.5rem;
    }

    .monthly-highlight-rating,
    .monthly-highlight-date {
        font-size: 1rem;
        padding: 0.625rem 1.25rem;
    }

    .monthly-highlight-meta {
        gap: 1rem;
    }

    .monthly-highlight-pagination {
        margin-top: 2rem;
        gap: 0.625rem;
    }

    .monthly-highlight-pagination-bullet {
        width: 10px;
        height: 10px;
    }

    .monthly-highlight-pagination-bullet-active {
        width: 10px;
        height: 10px;
    }

    .at-a-glance-section {
        padding-bottom: 1rem;
    }

    .at-a-glance-header {
        margin-bottom: 2rem;
    }

    .at-a-glance-title {
        font-size: 1.75rem;
    }

    .at-a-glance-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .at-a-glance-tile {
        padding: 2rem;
        min-height: 220px;
    }

    .at-a-glance-director-image {
        width: 100px;
        height: 100px;
    }

    .at-a-glance-director-name {
        font-size: 1.5rem;
    }

    .at-a-glance-number {
        font-size: 3rem;
    }

    .at-a-glance-button {
        padding: 1.25rem 2rem;
        font-size: 1.125rem;
    }

    .home-title {
        font-size: 4rem;
        margin: 4rem 0 5rem;
    }

    .home-tiles {
        gap: 2rem;
        width: 100%;
        max-width: 600px;
    }

    .home-tile {
        padding: 2rem;
    }

    .tile-title {
        font-size: 1.75rem;
    }

    .tile-description {
        font-size: 1rem;
    }

    .tile-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    html.home-page {
        position: relative !important;
        overflow-y: auto !important;
    }
    
    body.home-page {
        position: relative !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .home-container {
        padding: 1.5rem 1rem;
        padding-top: 7rem;
        padding-bottom: 0.5rem;
        min-height: 100vh;
        -webkit-overflow-scrolling: touch;
    }

    .home-greeting {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .recently-watched-section {
        margin-bottom: 2rem;
    }

    .recently-watched-title {
        font-size: 1.25rem;
    }

    .recently-watched-header {
        margin-bottom: 1rem;
    }

    .recently-watched-see-all {
        font-size: 0.8125rem;
    }

    .recently-watched-see-all i {
        font-size: 0.8125rem;
    }

    .recently-watched-swiper {
        overflow: hidden;
    }

    .at-a-glance-section {
        padding-bottom: 1rem;
    }

    .add-film-section {
        margin-bottom: 2rem;
    }

    .add-film-container {
        padding: 2rem 1.5rem;
    }

    .add-film-title {
        font-size: 1.5rem;
    }

    .add-film-subheading {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .add-film-button {
        font-size: 0.9375rem;
        padding: 0.75rem 1.5rem;
        max-width: 180px;
    }

    .monthly-highlight-section {
        margin-bottom: 2rem;
    }

    .monthly-highlight-content {
        padding: 1.25rem;
    }

    .monthly-highlight-title-section {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .monthly-highlight-title {
        font-size: 1.75rem;
    }

    .monthly-highlight-rating,
    .monthly-highlight-date {
        font-size: 0.75rem;
        padding: 0.375rem 0.875rem;
    }

    .monthly-highlight-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .monthly-highlight-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .monthly-highlight-pagination {
        margin-top: 2rem;
        gap: 0.375rem;
    }

    .monthly-highlight-pagination-bullet {
        width: 6px;
        height: 6px;
    }

    .monthly-highlight-pagination-bullet-active {
        width: 6px;
        height: 6px;
    }

    .at-a-glance-section {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }

    .at-a-glance-header {
        margin-bottom: 1rem;
    }

    .at-a-glance-title {
        font-size: 1.25rem;
    }

    .at-a-glance-year-selector {
        font-size: 0.8125rem;
        padding: 0.375rem 0.875rem;
        padding-right: 2rem;
    }

    .at-a-glance-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .at-a-glance-tile {
        min-height: 140px;
        padding: 1rem;
    }

    .at-a-glance-label {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .at-a-glance-director-image {
        width: 50px;
        height: 50px;
    }

    .at-a-glance-director-name {
        font-size: 0.875rem;
    }

    .at-a-glance-number {
        font-size: 1.75rem;
    }

    .at-a-glance-director-image {
        width: 60px;
        height: 60px;
    }

    .at-a-glance-director-name {
        font-size: 1rem;
    }

    .at-a-glance-number {
        font-size: 2rem;
    }

    .at-a-glance-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .home-title {
        font-size: 2.5rem;
        margin: 0 0 3rem;
    }

    .home-tiles {
        gap: 1.25rem;
        width: 100%;
    }

    .home-tile {
        padding: 1.25rem;
    }

    .tile-title {
        font-size: 1.25rem;
    }

    .tile-description {
        font-size: 0.875rem;
    }

    .tile-icon {
        font-size: 1.75rem;
    }
}

