/* Magic Comments Sidebar Styles */

.game-with-comments-container {
    display: grid;
    grid-template-columns: minmax(700px, 1fr) 320px;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: start;
}

/* Ensure game card uses full width in grid layout */
.game-with-comments-container .magic-game-card {
    width: 100%;
    max-width: none;
}

/* Comments Sidebar */
.magic-comments-sidebar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
    height: fit-content;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 100px;
    font-size: 0.875rem;
}

.magic-comments-sidebar-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-white-border);
}

.magic-comments-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8B5CF6, #F97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.magic-comments-sidebar-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

/* Compact Comment Form */
.magic-comment-form-compact {
    margin-bottom: 1.5rem;
}

.magic-comment-input-compact {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.magic-comment-textarea-compact {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
    transition: all 0.3s ease;
}

.magic-comment-input-compact:focus,
.magic-comment-textarea-compact:focus {
    outline: none;
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.1);
}

/* Comments List Container */
.magic-comments-list-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
}

.magic-comments-list-container::-webkit-scrollbar {
    width: 6px;
}

.magic-comments-list-container::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 3px;
}

.magic-comments-list-container::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 3px;
}

.magic-comments-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* Compact Comment Items */
.magic-comment-item-compact {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.magic-comment-item-compact:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(-2px);
}

.magic-comment-header-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.magic-comment-avatar-compact {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8B5CF6, #F97316);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.magic-comment-author-compact {
    flex: 1;
    min-width: 0;
}

.magic-comment-author-name-compact {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.magic-comment-time-compact {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.magic-comment-content-compact {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.magic-comment-actions-compact {
    display: flex;
    gap: 0.5rem;
}

.magic-comment-action-compact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    color: #8B5CF6;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.magic-comment-action-compact:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

.magic-comment-action-compact.liked {
    background: linear-gradient(135deg, #8B5CF6, #F97316);
    border-color: transparent;
    color: white;
}

/* Pagination Controls */
.magic-comments-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-white-border);
}

.magic-pagination-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    color: #8B5CF6;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.magic-pagination-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.magic-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.magic-pagination-btn.active {
    background: linear-gradient(135deg, #8B5CF6, #F97316);
    border-color: transparent;
    color: white;
}

.magic-pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0 0.5rem;
}

/* Submit Button */
.magic-comment-submit-compact {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #8B5CF6, #F97316);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.magic-comment-submit-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.magic-comment-submit-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .game-with-comments-container {
        grid-template-columns: 1fr;
    }
    
    .magic-comments-sidebar {
        max-width: 600px;
        margin: 2rem auto 0;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .magic-comments-sidebar {
        margin: 1rem;
        padding: 1rem;
    }
    
    .magic-comments-sidebar-title {
        font-size: 1.25rem;
    }
}