/* Multi-Column Lists Component Styles */
.multi-column-lists-section {
    @apply bg-theme-primary py-8 lg:py-12;
    position: relative;
    overflow: hidden;
}

/* Utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.multi-column-lists-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    opacity: 0.3;
    z-index: 0;
}

.multi-column-lists-section > * {
    position: relative;
    z-index: 1;
}

/* Column List Styles */
.column-list {
    @apply rounded-lg p-4;
    background-color: rgba(var(--bg-secondary-rgb, 17, 17, 17), 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 300px;
}

.column-list:hover {
    background-color: rgba(var(--bg-secondary-rgb, 17, 17, 17), 0.3);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Column Header Styles */
.column-header {
    @apply flex items-center mb-4;
}

.column-header .icon-wrapper {
    @apply p-1.5 rounded mr-2 flex-shrink-0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.column-header h3 {
    @apply text-sm font-bold text-theme-primary uppercase tracking-wide;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Movie List Styles */
.movie-list {
    @apply space-y-2;
}

.movie-item {
    @apply flex items-start space-x-2 p-2 rounded transition-all duration-200;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.movie-item:hover {
    background-color: rgba(var(--bg-secondary-rgb, 17, 17, 17), 0.3);
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Comment List Styles (for Column 4) */
.comment-list {
    @apply space-y-2;
}

.comment-item {
    @apply flex items-start space-x-3 p-2.5 rounded-lg transition-all duration-200;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-item:hover {
    background-color: rgba(var(--bg-secondary-rgb, 17, 17, 17), 0.3);
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Rank Number Styles */
.rank-number {
    @apply flex-shrink-0 w-6 h-6 rounded flex items-center justify-center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.rank-number span {
    @apply text-white font-bold text-xs;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Movie Poster Styles */
.movie-poster {
    @apply flex-shrink-0;
}

.movie-poster img {
    @apply w-10 h-14 object-cover rounded;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-poster img:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Movie Info Styles */
.movie-info {
    @apply flex-1 min-w-0;
}

.movie-info h4 {
    @apply text-theme-primary font-medium text-xs leading-tight truncate transition-colors;
    line-height: 1.3;
}

.movie-info h4:hover {
    @apply text-main;
}

.movie-info p {
    @apply text-theme-tertiary text-xs mt-0.5 leading-tight;
    line-height: 1.2;
}

/* Movie Title Specific Styles */
.movie-title {
    font-size: 11px !important;
    font-weight: 400 !important;
    color: var(--text-primary) !important;
    line-height: 1.2 !important;
    font-family: inherit;
    letter-spacing: 0.01em;
    word-break: break-word;
    hyphens: auto;
    transition: all 0.3s ease;

    /* Text truncation for multi-line */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    /* Enhanced readability */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.movie-title a {
    color: inherit !important;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.movie-title:hover {
    color: var(--main-color) !important;
    transform: translateX(1px);
}

.movie-title a:hover {
    color: var(--main-color) !important;
    text-decoration: underline;
    text-decoration-color: rgba(var(--main-color-rgb), 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.movie-title:focus-within {
    @apply text-main;
    outline: 2px solid rgba(var(--main-color-rgb), 0.5);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Category Name Styles (similar to movie-title) */
.category-name {
    font-size: 11px !important;
    font-weight: 400 !important;
    color: var(--text-primary) !important;
    line-height: 1.2 !important;
    font-family: inherit;
    letter-spacing: 0.01em;
    word-break: break-word;
    transition: all 0.3s ease;

    /* Enhanced readability */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.category-name a {
    color: inherit !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-name:hover {
    color: var(--main-color) !important;
    transform: translateX(1px);
}

.category-name a:hover {
    color: var(--main-color) !important;
    text-decoration: underline;
    text-decoration-color: rgba(var(--main-color-rgb), 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* User Avatar Styles (for Column 4) */
.user-avatar {
    @apply flex-shrink-0;
}

.user-avatar img {
    @apply w-10 h-10 object-cover rounded-full;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-avatar img:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Comment Info Styles (for Column 4) */
.comment-info {
    @apply flex-1 min-w-0;
}

.comment-content {
    @apply mb-2;
}

.comment-content p {
    @apply text-theme-secondary text-xs leading-relaxed;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comment-meta {
    @apply flex items-center justify-between text-xs;
}

.comment-meta .user-info span {
    @apply text-theme-tertiary font-medium;
}

.comment-meta .movie-info a {
    @apply text-main transition-colors duration-200;
    color: var(--main-color);
    text-decoration: none;
}

.comment-meta .movie-info a:hover {
    color: rgba(var(--main-color-rgb), 0.8);
}

.comment-meta .movie-info a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .multi-column-lists-section {
        @apply py-6;
    }

    .column-list {
        @apply p-4;
    }

    .column-header h3 {
        @apply text-base;
    }

    .movie-item,
    .comment-item {
        @apply p-2 space-x-2;
    }

    .rank-number {
        @apply w-6 h-6;
    }

    .rank-number span {
        @apply text-xs;
    }

    .movie-poster img {
        @apply w-10 h-14;
    }

    .user-avatar img,
    .user-avatar div {
        @apply w-8 h-8;
    }

    .comment-content p {
        font-size: 11px;
        line-height: 1.2;
    }

    .comment-meta {
        font-size: 10px;
    }

    .movie-info h4,
    .comment-content h4 {
        @apply text-xs;
    }

    .movie-info p {
        @apply text-xs;
    }

    .comment-item {
        @apply p-2 space-x-2;
    }

    .user-avatar img,
    .user-avatar div {
        @apply w-6 h-6;
    }

    .comment-content p {
        font-size: 10px;
        line-height: 1.1;
    }

    .comment-meta {
        font-size: 9px;
    }

    /* Movie Title responsive adjustments */
    .movie-title {
        font-size: 11px;
        line-height: 1.2;
        -webkit-line-clamp: 2;
    }

    .category-name {
        font-size: 11px;
        line-height: 1.2;
    }
}

@media (max-width: 640px) {
    .column-list {
        @apply p-3;
    }

    .column-header {
        @apply mb-4;
    }

    .column-header .icon-wrapper {
        @apply p-1.5 mr-2;
    }

    .column-header h3 {
        @apply text-sm;
    }

    .movie-list,
    .comment-list {
        @apply space-y-2;
    }

    /* Movie Title small screen adjustments */
    .movie-title {
        font-size: 10px;
        line-height: 1.1;
        -webkit-line-clamp: 1;
    }

    .category-name {
        font-size: 10px;
        line-height: 1.1;
    }
}

/* Animation for loading state */
.column-list.loading {
    opacity: 0.7;
    pointer-events: none;
}

.column-list.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(0, 255, 102, 0.3);
    border-top: 2px solid var(--main-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced hover effects */
.movie-item:hover .rank-number {
    transform: scale(1.1);
}

.movie-item:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-item:hover .movie-title {
    @apply text-main;
    transform: translateX(2px);
}

.category-item:hover .category-name {
    @apply text-main;
    transform: translateX(2px);
}

/* Focus states for accessibility */
.movie-item:focus-within {
    background-color: rgba(var(--bg-secondary-rgb, 17, 17, 17), 0.5);
    outline: 2px solid var(--main-color);
    outline-offset: 2px;
}

/* Strong overrides for typography */
.multi-column-lists-section .movie-title,
.multi-column-lists-section .category-name {
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

.multi-column-lists-section .movie-title a,
.multi-column-lists-section .category-name a {
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .column-list {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .movie-item {
        background: rgba(0, 0, 0, 0.2);
    }

    .movie-item:hover {
        background: rgba(0, 0, 0, 0.4);
    }
}
