/* ============================================
   MOBILE REDESIGN - BELOW 768PX
   ============================================ */

/* === TABLET/LARGE PHONE (768px) === */
@media (max-width: 768px) {
    /* Main container - footer handles floating nav spacing */
    .home {
        padding: 16px 12px 0;
        max-width: 100%;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .top-row {
        display: contents; /* Flatten to allow reordering children */
    }

    /* Activity section stays at top */
    .activity-section {
        order: 1;
        margin-bottom: 24px;
        width: 100%;
    }

    .activity-section .section-header {
        margin-bottom: 12px;
    }

    /* Compact activity tabs */
    .activity-tabs {
        gap: 2px;
        padding: 2px;
    }

    .activity-tab {
        padding: 8px 12px;
        font-size: 0.75rem;
        min-height: 44px; /* Touch target */
    }

    /* Activity feed - scrollable container (3 cards × 100px + 2 gaps × 8px = 316px) */
    .activity-feed {
        max-height: 316px;
        padding-right: 0;
        width: 100%;
    }

    .activity-list {
        width: 100%;
    }

    .activity-item {
        min-height: 100px;
        height: 100px;
        width: 100%;
    }

    /* Forum cards - same height as anime cards */
    .activity-item.activity-forum {
        height: 100px;
        padding: 10px 12px;
        box-sizing: border-box;
    }

    .activity-cover {
        width: 60px;
        flex-shrink: 0;
        border-radius: 6px 0 0 6px;
        align-self: stretch;
    }

    .activity-cover img {
        border-radius: 6px 0 0 6px;
        min-height: 100%;
    }

    .activity-body {
        padding: 6px 10px;
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    /* News/Discussions pushed to very bottom */
    .community-aside {
        order: 100;
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 8px;
    }

    /* News and discussion items - full width */
    .news-item,
    .discussion-item {
        padding: 12px;
        min-height: 44px;
    }

    .news-item-title,
    .discussion-item-title {
        font-size: 0.85rem;
        padding-right: 70px;
    }

    /* Main grid - flatten for reordering */
    .home-grid {
        display: contents; /* Flatten to allow children to participate in home flex */
    }

    .main-content {
        order: 2;
        display: flex;
        flex-direction: column;
        padding-left: 0; /* Remove desktop carousel padding on mobile */
    }

    /* Sidebar content comes after main content but before News/Discussions */
    .sidebar {
        order: 50;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* === MOBILE CONTENT PRIORITIZATION === */

    /* Hide "Coming Soon" placeholders - they add no value on mobile */
    .coming-soon,
    .coming-soon-small {
        display: none !important;
    }

    /* Hide sections containing "Coming Soon" - Airing Today */
    .main-content .section:has(.coming-soon) {
        display: none !important;
    }

    /* Hide Site Stats on mobile */
    .sidebar-box:has(.stats-grid) {
        display: none !important;
    }

    /* Hide Seasons sidebar box (Coming Soon) */
    .sidebar-box:has(.coming-soon-small) {
        display: none !important;
    }

    /* Reorder sidebar content */
    .sidebar-box:has(#topAnimeList) {
        order: 1; /* Top Anime first */
    }

    .sidebar-box:has(#topMangaList) {
        order: 2; /* Top Manga second */
    }

    .sidebar-box:has(#reviewsList) {
        order: 3; /* Reviews - appears above News/Discussions */
    }

    /* Fallback for browsers without :has() - hide by position */
    /* Stats is 5th, Seasons is 4th in sidebar */
    @supports not selector(:has(*)) {
        .sidebar-box:nth-of-type(4),
        .sidebar-box:nth-of-type(5) {
            display: none !important;
        }
    }

    /* Sections spacing */
    .section {
        margin-bottom: 28px;
    }

    .section-header {
        margin-bottom: 12px;
    }

    .section-header h2 {
        font-size: 0.8rem;
    }

    .section-header a {
        font-size: 0.75rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Anime cards - 3 columns on mobile */
    .cards-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .card-img {
        border-radius: 4px;
        margin-bottom: 6px;
    }

    .card-title {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .card-meta {
        font-size: 0.65rem;
    }

    .card-score {
        font-size: 0.7rem;
        padding: 20px 6px 4px;
    }

    .card-format {
        font-size: 0.55rem;
        padding: 2px 4px;
    }

    /* Continue watching - 3 columns */
    .watching-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .watching-title {
        font-size: 0.75rem;
    }

    .watching-ep {
        font-size: 0.6rem;
        padding: 2px 5px;
    }

    /* Recommendations carousel - mobile optimized */
    #recsSection .section-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    #recsSection .recs-tabs {
        gap: 4px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #recsSection .recs-tabs::-webkit-scrollbar {
        display: none;
    }

    #recsSection .recs-tab {
        padding: 8px 12px;
        font-size: 0.7rem;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 44px;
    }

    .recs-scroll-container {
        padding: 0 4px;
        /* Rubber-band scroll feel */
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .recs-cards .rec-card-wrapper,
    .recs-cards .card-skel {
        width: 120px;
        scroll-snap-align: start;
    }

    /* Hide arrows on mobile - use swipe */
    .recs-arrow {
        display: none !important;
    }

    /* Match badge smaller */
    .match-badge {
        font-size: 0.6rem;
        padding: 2px 5px;
    }

    /* Dismiss button always visible on mobile */
    .dismiss-btn {
        opacity: 1;
        width: 28px;
        height: 28px;
        min-width: 28px;
        max-width: 28px;
        padding: 6px;
        box-sizing: border-box;
    }

    .dismiss-btn svg {
        width: 14px;
        height: 14px;
    }

    /* News grid - single column */
    .news-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .news-card {
        padding: 14px;
        min-height: auto;
    }

    .news-card-title {
        font-size: 0.85rem;
    }

    .news-card-preview {
        font-size: 0.75rem;
    }

    /* Community grid - single column */
    .community-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Reviews - single column */
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Airing schedule - compact */
    .schedule-item {
        padding: 10px;
        min-height: 44px;
    }

    .schedule-time {
        min-width: 45px;
        font-size: 0.7rem;
    }

    .schedule-cover {
        width: 36px;
        height: 50px;
    }

    .schedule-title {
        font-size: 0.8rem;
    }

    .schedule-ep {
        font-size: 0.65rem;
    }

    /* Sidebar boxes */
    .sidebar-box {
        padding: 14px;
    }

    .sidebar-title h3 {
        font-size: 0.75rem;
    }

    /* Top list - compact */
    .top-item {
        padding: 8px 6px;
        min-height: 44px;
    }

    .top-rank {
        font-size: 0.8rem;
    }

    .top-cover {
        width: 30px;
        height: 42px;
    }

    .top-name {
        font-size: 0.75rem;
    }

    .top-score {
        font-size: 0.65rem;
    }

    /* Seasons - single column */
    .seasons-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .season-link {
        padding: 12px;
        min-height: 44px;
        font-size: 0.75rem;
    }

    /* Stats grid - 2 columns on tablet */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-item {
        padding: 12px 8px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .stat-today {
        font-size: 0.55rem;
    }

    /* Thread cards */
    .thread-card {
        padding: 12px;
        min-height: 44px;
    }

    .thread-title {
        font-size: 0.8rem;
    }

    .thread-cat {
        font-size: 0.6rem;
    }

    /* Review sidebar items */
    .review-sidebar-item {
        padding: 10px 6px;
    }

    .review-sidebar-title {
        font-size: 0.75rem;
    }

    .review-sidebar-anime {
        font-size: 0.65rem;
    }

    /* Sequel alerts - single column */
    .sequel-alerts-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sequel-alert-card {
        padding: 12px;
        min-height: 44px;
    }

    /* Empty states */
    .empty-state {
        padding: 32px 16px;
    }

    .empty-state-icon {
        width: 40px;
        height: 40px;
    }

    .empty-state-text {
        font-size: 0.8rem;
    }

    .coming-soon {
        padding: 36px 20px;
    }

    .coming-soon h3 {
        font-size: 0.9rem;
    }

    .coming-soon p {
        font-size: 0.8rem;
    }

    /* Accuracy banner */
    .recs-accuracy-banner {
        padding: 10px 12px;
        font-size: 0.75rem;
    }

    .recs-accuracy-banner svg {
        width: 16px;
        height: 16px;
    }
}

/* === MOBILE PULL-TO-REFRESH INDICATOR === */
.recs-refresh-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.recs-refresh-indicator .refresh-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.recs-refresh-indicator .refresh-icon svg {
    width: 100%;
    height: 100%;
}

.recs-refresh-indicator span {
    font-size: 0.6rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Ready state - pull threshold reached */
.recs-refresh-indicator.ready {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(99, 102, 241, 0.15));
    border-color: var(--primary);
}

.recs-refresh-indicator.ready .refresh-icon {
    color: var(--primary);
    transform: rotate(180deg);
}

.recs-refresh-indicator.ready span {
    color: var(--primary);
    font-weight: 500;
}

/* Loading state - refreshing */
.recs-refresh-indicator.loading {
    opacity: 1 !important;
    background: var(--bg-elevated);
    border-color: var(--primary);
}

.recs-refresh-indicator.loading .refresh-icon {
    animation: spin-refresh 0.8s linear infinite;
}

.recs-refresh-indicator.loading span {
    display: none;
}

.recs-refresh-indicator.loading::after {
    content: 'Refreshing...';
    font-size: 0.6rem;
    color: var(--primary);
    font-weight: 500;
}

@keyframes spin-refresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === SMALL PHONE (480px) === */
@media (max-width: 480px) {
    /* Tighter padding for small screens */
    .home {
        padding: 12px 10px 0;
        overflow-x: hidden;
    }

    /* Top row */
    .top-row {
        gap: 16px;
        margin-bottom: 24px;
    }

    /* Activity feed - more compact */
    .activity-section .section-header h2 {
        font-size: 0.75rem;
    }

    .activity-tabs {
        gap: 2px;
    }

    .activity-tab {
        padding: 6px 10px;
        font-size: 0.7rem;
        min-height: 44px;
    }

    /* Activity feed - scrollable container (3 cards × 90px + 2 gaps × 8px = 286px) */
    .activity-feed {
        max-height: 286px;
        padding-right: 0;
    }

    .activity-item {
        min-height: 90px;
        height: 90px;
    }

    /* Forum cards - same height as anime cards */
    .activity-item.activity-forum {
        height: 90px;
        padding: 8px 10px;
        box-sizing: border-box;
    }

    .activity-cover {
        width: 50px;
        flex-shrink: 0;
        border-radius: 5px 0 0 5px;
        align-self: stretch;
    }

    .activity-cover img {
        border-radius: 5px 0 0 5px;
        min-height: 100%;
    }

    .activity-body {
        padding: 6px 8px;
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    .activity-header {
        gap: 6px;
    }

    .activity-avatar {
        width: 20px;
        height: 20px;
    }

    .activity-avatar svg {
        width: 10px;
        height: 10px;
    }

    .activity-username {
        font-size: 0.7rem;
    }

    .activity-time {
        font-size: 0.6rem;
    }

    .activity-action {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .activity-text {
        font-size: 0.7rem;
    }

    .activity-metrics {
        gap: 8px;
        font-size: 0.65rem;
    }

    .activity-metric svg {
        width: 11px;
        height: 11px;
    }

    /* News and discussion items */
    .news-item,
    .discussion-item {
        padding: 10px;
        gap: 12px;
    }

    .news-item-title,
    .discussion-item-title {
        font-size: 0.8rem;
        padding-right: 60px;
        -webkit-line-clamp: 2;
    }

    .news-item-meta,
    .discussion-item-meta {
        font-size: 0.65rem;
        right: 10px;
        top: 10px;
    }

    .news-item-preview,
    .discussion-item-preview {
        font-size: 0.7rem;
    }

    .thread-metrics {
        gap: 8px;
        font-size: 0.65rem;
    }

    .thread-metric svg {
        width: 10px;
        height: 10px;
    }

    /* Section spacing */
    .section {
        margin-bottom: 24px;
    }

    .section-header {
        margin-bottom: 10px;
    }

    .section-header h2 {
        font-size: 0.75rem;
    }

    .section-header a {
        font-size: 0.7rem;
    }

    /* Anime cards - 3 columns, compact */
    .cards-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .card-img {
        border-radius: 4px;
        margin-bottom: 4px;
    }

    .card-title {
        font-size: 0.7rem;
        line-height: 1.25;
        -webkit-line-clamp: 2;
    }

    .card-meta {
        font-size: 0.6rem;
        margin-top: 1px;
    }

    .card-score {
        font-size: 0.65rem;
        padding: 16px 6px 4px;
        gap: 3px;
    }

    .card-score svg {
        width: 10px;
        height: 10px;
    }

    .card-format {
        font-size: 0.5rem;
        padding: 2px 4px;
        top: 4px;
        left: 4px;
    }

    /* Continue watching - 3 columns */
    .watching-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .watching-cover {
        border-radius: 6px;
        margin-bottom: 6px;
    }

    .watching-title {
        font-size: 0.7rem;
    }

    .watching-ep {
        font-size: 0.55rem;
        padding: 2px 4px;
        bottom: 6px;
        right: 6px;
    }

    .watching-progress {
        height: 2px;
    }

    /* Recommendations - very compact */
    #recsSection .section-header {
        gap: 6px;
    }

    #recsSection .recs-tab {
        padding: 6px 10px;
        font-size: 0.65rem;
    }

    .recs-scroll-container {
        padding: 0 4px;
    }

    .recs-cards {
        gap: 12px;
    }

    .recs-cards .rec-card-wrapper,
    .recs-cards .card-skel {
        width: 100px;
    }

    .recs-cards .card-title {
        font-size: 0.7rem;
    }

    /* Arrows already hidden at 768px */

    /* Match badge */
    .match-badge {
        font-size: 0.55rem;
        padding: 2px 4px;
        top: 4px;
        right: 4px;
    }

    .card-gem {
        font-size: 0.8rem;
        top: 4px;
        left: 4px;
    }

    /* Dismiss button - fixed size on mobile */
    .dismiss-btn {
        top: 6px;
        right: 6px;
        padding: 5px;
        width: 24px;
        height: 24px;
        max-width: 24px;
        min-width: 24px;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    .dismiss-btn svg {
        width: 12px;
        height: 12px;
    }

    /* Disable hover expansion on mobile */
    .rec-card-wrapper:hover .dismiss-btn {
        max-width: 24px;
        width: 24px;
        padding: 5px;
        gap: 0;
    }

    .rec-card-wrapper:hover .dismiss-btn .dismiss-text {
        display: none;
    }

    /* Dismissed card */
    .dismissed-card {
        border-radius: 4px;
    }

    .dismissed-content {
        gap: 8px;
        padding: 12px;
    }

    .dismissed-text {
        font-size: 0.7rem;
    }

    .undo-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
        min-height: 44px;
    }

    /* News cards */
    .news-card {
        padding: 12px;
    }

    .news-card-tag {
        font-size: 0.6rem;
        padding: 2px 5px;
        margin-bottom: 6px;
    }

    .news-card-title {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .news-card-preview {
        font-size: 0.7rem;
    }

    .news-card-meta {
        font-size: 0.65rem;
        gap: 6px;
        margin-top: 8px;
    }

    /* Reviews */
    .review-card {
        border-radius: 6px;
    }

    .review-header {
        padding: 10px;
        gap: 10px;
    }

    .review-cover {
        width: 45px;
        height: 63px;
    }

    .review-media-title {
        font-size: 0.8rem;
    }

    .review-rating {
        font-size: 0.75rem;
        gap: 3px;
    }

    .review-rating svg {
        width: 12px;
        height: 12px;
    }

    .review-body {
        padding: 10px;
    }

    .review-text {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .review-author {
        font-size: 0.65rem;
    }

    /* Airing schedule */
    .schedule-item {
        padding: 8px 10px;
        gap: 10px;
    }

    .schedule-time {
        min-width: 40px;
        font-size: 0.65rem;
    }

    .schedule-cover {
        width: 32px;
        height: 45px;
    }

    .schedule-title {
        font-size: 0.75rem;
    }

    .schedule-ep {
        font-size: 0.6rem;
    }

    /* Sidebar */
    .sidebar {
        gap: 16px;
    }

    .sidebar-box {
        padding: 12px;
        border-radius: 8px;
    }

    .sidebar-title {
        margin-bottom: 10px;
    }

    .sidebar-title h3 {
        font-size: 0.7rem;
    }

    .sidebar-title a {
        font-size: 0.65rem;
    }

    /* Top list */
    .top-item {
        padding: 6px 4px;
        gap: 8px;
    }

    .top-rank {
        width: 16px;
        font-size: 0.75rem;
    }

    .top-cover {
        width: 28px;
        height: 39px;
    }

    .top-name {
        font-size: 0.7rem;
    }

    .top-score {
        font-size: 0.6rem;
    }

    /* Seasons */
    .season-link {
        padding: 10px;
        gap: 6px;
        font-size: 0.7rem;
    }

    .season-icon {
        font-size: 0.9rem;
    }

    /* Stats - 2 columns on small mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .stat-item {
        padding: 10px 6px;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .stat-today {
        font-size: 0.5rem;
    }

    /* Thread cards */
    .thread-card {
        padding: 10px;
        gap: 10px;
    }

    .thread-avatar {
        width: 28px;
        height: 28px;
    }

    .thread-avatar svg {
        width: 14px;
        height: 14px;
    }

    .thread-title {
        font-size: 0.75rem;
    }

    .thread-info {
        gap: 6px;
        font-size: 0.65rem;
    }

    .thread-cat {
        font-size: 0.55rem;
        padding: 2px 5px;
    }

    /* Review sidebar */
    .review-sidebar-item {
        padding: 8px 4px;
    }

    .review-sidebar-title {
        font-size: 0.7rem;
    }

    .review-sidebar-anime {
        font-size: 0.6rem;
    }

    .review-sidebar-meta {
        gap: 6px;
        font-size: 0.65rem;
    }

    /* Sequel alerts */
    .sequel-alert-card {
        padding: 10px;
        gap: 10px;
    }

    .sequel-card-img img {
        width: 55px;
        height: 77px;
    }

    .sequel-badge {
        font-size: 0.55rem;
        padding: 2px 5px;
    }

    .sequel-title {
        font-size: 0.8rem;
    }

    .sequel-meta {
        font-size: 0.7rem;
    }

    .sequel-prequel {
        font-size: 0.65rem;
    }

    /* Empty states */
    .empty-state {
        padding: 28px 12px;
        gap: 10px;
    }

    .empty-state-icon {
        width: 36px;
        height: 36px;
    }

    .empty-state-text {
        font-size: 0.75rem;
        max-width: 240px;
    }

    .coming-soon {
        padding: 32px 16px;
    }

    .coming-soon-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }

    .coming-soon h3 {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .coming-soon p {
        font-size: 0.75rem;
    }

    .coming-soon-small {
        padding: 24px 12px;
        gap: 6px;
    }

    .coming-soon-small svg {
        width: 28px;
        height: 28px;
    }

    .coming-soon-small span {
        font-size: 0.75rem;
    }

    .not-enough-data {
        padding: 24px 12px;
        gap: 4px;
    }

    .not-enough-data svg {
        width: 28px;
        height: 28px;
    }

    .not-enough-data span {
        font-size: 0.8rem;
    }

    .not-enough-data small {
        font-size: 0.65rem;
    }

    /* Activity empty state */
    .activity-empty {
        padding: 40px 16px;
    }

    .activity-empty-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }

    .activity-empty p {
        font-size: 0.8rem;
    }

    /* Load more button */
    .activity-load-more {
        padding: 10px;
        font-size: 0.8rem;
        min-height: 44px;
    }

    /* Accuracy banner */
    .recs-accuracy-banner {
        padding: 8px 10px;
        gap: 8px;
        font-size: 0.7rem;
        margin-bottom: 10px;
    }

    .recs-accuracy-banner svg {
        width: 14px;
        height: 14px;
    }

    /* Grid view all link */
    .grid-view-all {
        font-size: 0.7rem;
        top: -24px;
    }

    /* Rewatch card meta */
    .rewatch-ago {
        font-size: 0.65rem;
    }

    /* Back to top button */
    .activity-back-to-top {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        border-radius: 6px;
        bottom: 10px;
        margin-top: -36px;
    }

    .activity-back-to-top svg {
        width: 14px;
        height: 14px;
    }

    /* Forum activity adjustments */
    .activity-forum .activity-content {
        padding-left: 28px;
    }

    .activity-thread-title {
        font-size: 0.75rem;
    }

    .activity-action-text {
        font-size: 0.7rem;
        gap: 3px;
    }

    .activity-icon {
        width: 12px;
        height: 12px;
    }

    .activity-preview {
        font-size: 0.68rem;
    }

    /* Status badge in activity */
    .activity-action .score-badge {
        padding: 2px 5px;
        margin-left: 3px;
        font-size: 0.75rem;
    }

    .activity-action .score-badge svg {
        width: 10px;
        height: 10px;
    }

    .activity-action .status-verb svg {
        width: 12px;
        height: 12px;
        vertical-align: -1px;
        margin-right: 3px;
    }

    /* Review activity title */
    .activity-review-title {
        font-size: 0.75rem;
    }
}

/* === EXTRA SMALL PHONE (360px) === */
@media (max-width: 360px) {
    /* Even tighter spacing */
    .home {
        padding: 10px 10px 0;
    }

    /* Activity feed */
    .activity-tab {
        padding: 6px 8px;
        font-size: 0.65rem;
    }

    /* Activity feed - scrollable container (3 cards × 80px + 2 gaps × 8px = 256px) */
    .activity-feed {
        max-height: 256px;
    }

    .activity-item {
        min-height: 80px;
        height: 80px;
    }

    /* Forum cards - same height as anime cards */
    .activity-item.activity-forum {
        height: 80px;
        padding: 6px 8px;
        box-sizing: border-box;
    }

    .activity-cover {
        width: 45px;
        border-radius: 4px 0 0 4px;
        align-self: stretch;
    }

    .activity-cover img {
        border-radius: 4px 0 0 4px;
        min-height: 100%;
    }

    .activity-body {
        padding: 5px 6px;
        justify-content: center;
    }

    /* Anime cards - maintain 3 columns but smaller gaps */
    .cards-row {
        gap: 6px;
    }

    .watching-grid {
        gap: 6px;
    }

    .card-title {
        font-size: 0.65rem;
    }

    .card-meta {
        font-size: 0.55rem;
    }

    .activity-avatar {
        width: 18px;
        height: 18px;
    }

    .activity-username {
        font-size: 0.65rem;
    }

    .activity-action {
        font-size: 0.75rem;
    }

    /* Recommendations */
    .recs-cards .rec-card-wrapper,
    .recs-cards .card-skel {
        width: 90px;
    }

    .recs-cards {
        gap: 10px;
    }

    /* Reduce section spacing */
    .section {
        margin-bottom: 20px;
    }

    /* Sidebar */
    .sidebar {
        gap: 14px;
    }

    /* News and discussions */
    .news-item,
    .discussion-item {
        padding: 8px;
    }

    .news-item-title,
    .discussion-item-title {
        font-size: 0.75rem;
        padding-right: 55px;
    }
}
